我正在尝试为 .container 类应用宽度,但即没有对 css 进行任何更改。如果有人有任何想法请告诉我。下面是我的代码。
<!-- [if ie 9]>
.nav > li > a{
padding-left: 20px !important;
}
.container{
max-width: 1350px !important;
width: 1350px !important;
}
<![endif]-->
最佳答案
条件注释用于 html 标记,而不是 css。 (请参阅 here 了解用法)
有针对 ie9 的 css hack,例如 /9
或 ... 这个:
/* target Internet Explorer 9 and Internet Explorer 10:*/
@media screen and (min-width:0\0) {
/* ie9+ code here */
...
}
检查这个例子 FIDDLE 在IE9+及其他浏览器中
关于html - 宽度不适用于 IE 9 中的类容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20517349/