Css IE条件注释仅适用于某些页面

Css IE条件注释仅适用于某些页面,css,internet-explorer,Css,Internet Explorer,我用这个有条件的评论来评论IE6-8的风格 <!--[if lt IE 9 ]> <link rel="stylesheet" type="text/css" href="Styles/ie6-8.css" /> <![endif]--> 我正在用browserstack.com测试它。 它在我的前两页上运行良好,但在我的后两页上完全没有采用任何风格,但评论完全相同。(我复制了它)。我的网站是如果你想看看IE6-8浏览器。 任何帮

我用这个有条件的评论来评论IE6-8的风格

<!--[if lt IE 9 ]>
        <link rel="stylesheet" type="text/css" href="Styles/ie6-8.css" />
    <![endif]-->

我正在用browserstack.com测试它。 它在我的前两页上运行良好,但在我的后两页上完全没有采用任何风格,但评论完全相同。(我复制了它)。我的网站是如果你想看看IE6-8浏览器。 任何帮助都将不胜感激。
谢谢

尝试使用此功能,这是一个更好的解决方案

<!doctype html>
<!--[if IE]><![endif]-->
<!--[if lt IE 7 ]> <html lang="en" class="ie6">    <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="ie7">    <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="ie8">    <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="ie9">    <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
    <head></head>
    <body></body>
</html>
.ie6 .class-name { 
    border:1px solid red;
}
.ie7 .class-name { 
    border:1px solid blue;
}