IE7 条件覆盖不起作用


<!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="/a/s/major-market/non-reponsive.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="/a/s/major-market/ie7.css"><![endif]-->

我有条件地包括了这两个声明。现在,当我尝试在ie7中ovveride类似的css时.css它不起作用。例如

在非应答中.css:

.header .features{
   width:25%;
}

在 ie7.css 中:

.header .features{
   width:20%!important;
}

由于某种原因,这不起作用。 请帮我弄清楚。

确保IE 7条件包含位于页面内所有其他 CSS 声明/包含的下方,否则它将被否决。

我很确定ie7.css根本没有加载。 !important会覆盖其他样式表中的任何内容。实际上,如果 ie7.css 排在无响应.css之后,那么无论如何!important都是不必要的。

这是我通过查看您提供的信息所能知道的最多内容。

最新更新