我在 CSS 中使用媒体查询来根据 IE11 和 Chrome 的屏幕分辨率缩放我的网页。当我运行 this webpage在我的 2 个不同屏幕上的 chrome(顺便说一句,我用它来确定我的最小宽度)上,我在小屏幕上得到 1366x768,在大屏幕上得到 1920x1080。当我在 IE11 的两个屏幕上运行相同的网页时,我得到的都是 1920x1080。这意味着我正在使用的媒体查询不适用于 IE,因为宽度是 1920。 我该怎么做才能解决这个问题?
.sizing{
}
@media all and (max-width: 1366px) {
.sizing{
zoom: 0.65;
-moz-transform: scale(0.85);
}
}
现在它只能在 chrome 中缩放,但不能在 IE 中缩放。
最佳答案
根据browser compatibility文档,IE 不支持 -moz-transform
。您应该改用 transform
。您可以尝试这样修改 css:
@media all and (max-width: 1366px) {
.sizing{
zoom: 0.65;
transform: scale(0.85);
-moz-transform: scale(0.85);
}
}
关于css - 媒体查询在 IE11 中不起作用(解决问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56856094/