gpt4 book ai didi

css - 媒体查询未在 IE 中被拾取

转载 作者:太空宇宙 更新时间:2023-11-04 00:07:26 25 4
gpt4 key购买 nike

我的 css 文件中有以下测试代码:

@media only screen and (min-width: 960px){
body{
background-color: red;
}
.wrapperShadow {
margin: 0px 3em;
box-shadow: 0px 0px 2.5em 0.5em rgba(0, 0, 0, 0.4);
}
.wrapperShadow {
margin: 0px 3em;
box-shadow: 0px 0px 2.5em 0.5em rgba(0, 0, 0, 0.4);
}

}

我添加红色只是为了测试。但是在 IE 中,它并没有按照 F12 工具选择这个 css
我只是想知道可能是什么问题。

编辑 1:

我注意到我的站点在各个页面上默认为兼容模式。当我使用地址栏中的小破页符号关闭兼容模式时,页面看起来是正确的。
为什么它默认为兼容模式?是不是因为我的标题中有以下行:

<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >

最佳答案

你有没有开启兼容模式?检查...

(IE9 在“兼容性 View 设置”下有“在兼容性 View 中显示 Intranet 站点”)

祝你好运..)

关于css - 媒体查询未在 IE 中被拾取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14390430/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com