我在 css 中有以下代码:
<!--[if IE 7]>
<style type="text/css">.slider li .slider-content{margin-left:-605px;}</style>
<![endif]-->
<!--[if gte IE 8]>
<style type="text/css">.slider li .slider-content{margin-left:-630px;}</style>
<![endif]-->
我在 IE9 中测试,当我选择 IE8 标准模式并查看 Internet 开发人员工具时,我看到 margin-left: -605px(而不是 -630px)
您能想到为什么这段代码在 IE8 模式下会使用 IE7 设置吗?
最佳答案
浏览器版本由浏览器模式设置决定,而不是文档模式设置。
如果您选择浏览器模式“IE 7”和文档模式“IE 8 标准”,它将使用 IE 7 来确定条件代码。
关于css - 为什么我的 Internet Explorer 条件格式不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12150253/