不要紧,你的IE浏览器在样式表的顺序.下面我使用的是标准的条件,但由于某种原因,当我重写从我base.css风格在ie.css其没有得到覆盖.
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="css/ie.css" />
<![endif]-->
<link type="text/css" rel="stylesheet" href="css/base.css"/>
Run Code Online (Sandbox Code Playgroud)
是.最后遇到的任何一个类都将覆盖之前的所有类.条件IE样式应该在您的基本样式之后,否则基本样式将覆盖IE样式.
<link type="text/css" rel="stylesheet" href="css/base.css"/>
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="css/ie.css" />
<![endif]-->
Run Code Online (Sandbox Code Playgroud)