【发布时间】:2017-01-20 06:51:41
【问题描述】:
我知道只能使用这个 CSS 获得 IE 的样式:
@media all and (-ms-high-contrast:none) {
.foo { color: green } /* IE10 */
*::-ms-backdrop, .foo { color: green } /* IE11 */
}
并且可以使用媒体查询使网站具有响应性:
@media only screen and (max-width: 800px) {
.foo { color: green }
}
如何编写代码以仅在特定屏幕尺寸下为 IE 创建样式?以下都不适合我,IE 只是忽略了这种风格:
@media only screen and (-ms-high-contrast:none) and (max-width: 800px)
@media all and (-ms-high-contrast:none) and (max-width: 800px)
想法?
【问题讨论】:
-
您只是想在 Internet Explorer 10+ 和 Edge 上使用这项工作吗?
标签: css internet-explorer styles media-queries responsive