【问题标题】:IE condition CSS includeIE 条件 CSS 包括
【发布时间】:2011-03-31 01:31:28
【问题描述】:
你好...
我遇到了 Internet Explorer 条件 cmets 的问题...
我使用这个条件
<!--[if lte IE8]>
<link rel="stylesheet" type="text/css" href="http://www.bvp.hr/Static/Style/IEFix6.css"/>
<![endif]-->
问题是,在 <!--[if lte IE8]><![endif]-->... 为什么?!?在 Firefox 中,它会正常呈现(afkors)。
【问题讨论】:
标签:
internet-explorer
conditional-comments
【解决方案1】:
见上文,加上代码顶部的 cmets 将强制 IE 进入 Quirks 模式,这将使页面的呈现效果不佳。删除这些 cmets:
<!-- UUIDM component start -->
<!-- Page generated by UUIDM component - part of WebSuite application platform. Copyright (C) Determinanta. All rights reserved. -->
【解决方案2】:
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
在上面的示例中,IE 和 6 之间有一个空格。只需对 IE 和 8 执行相同操作即可:
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="http://www.bvp.hr/Static/Style/IEFix6.css"/>
<![endif]-->
【解决方案3】:
我相信您需要做的就是在IE 和8 之间添加一个空格,所以它看起来像这样:
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="http://www.bvp.hr/Static/Style/IEFix6.css"/>
<![endif]-->