Jit*_*yas 1 css xhtml internet-explorer internet-explorer-8
我想只为所有IE版本6,7和8使用JavaScript.
嵌套条件(错误):
<!--[if lte IE 8]>
<!--[if gte IE 6]>
<!-- your stuff here -->
<![endif]-->
<![endif]-->
Run Code Online (Sandbox Code Playgroud)
编辑:
正如Martha强调的那样,嵌套条件不起作用,使用" &":
<!--[if (lte IE 8) & (gte IE 6)]>
<!-- your stuff here -->
<![endif]-->
Run Code Online (Sandbox Code Playgroud)
来自MSDN的其他示例:
<!--[if IE]><p>You are using Internet Explorer.</p><![endif]-->
<![if !IE]><p>You are not using Internet Explorer.</p><![endif]>
<!--[if IE 7]><p>Welcome to Internet Explorer 7!</p><![endif]-->
<!--[if !(IE 7)]><p>You are not using version 7.</p><![endif]-->
<!--[if gte IE 7]><p>You are using IE 7 or greater.</p><![endif]-->
<!--[if (IE 5)]><p>You are using IE 5 (any version).</p><![endif]-->
<!--[if (gte IE 5.5)&(lt IE 7)]><p>You are using IE 5.5 or IE 6.</p><![endif]-->
<!--[if lt IE 5.5]><p>Please upgrade your version of Internet Explorer.</p><![endif]-->
<!--[if true]>You are using an <em>uplevel</em> browser.<![endif]-->
<![if false]>You are using a <em>downlevel</em> browser.<![endif]>
<!--[if true]><![if IE 7]><p>This nested comment is displayed in IE 7.</p><![endif]><![endif]-->
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2329 次 |
| 最近记录: |