【发布时间】:2013-01-01 12:57:29
【问题描述】:
我有一个页面,我需要根据 IE 的版本显示帮助文本。我决定按照this blog 使用条件 cmets。我的html页面是这样的...
<!DOCTYPE html>
<html>
<head>
<title>Application Title</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
</head>
<!--[if lt IE 9 ]><body style="margin: 0px;" class="ie9lt"><![endif]-->
<!--[if IE]> <body style="margin: 0px;" class="ie9"> <![endif]-->
<!--[if (gt IE 10)|!(IE)]>-->
<body style="margin: 0px;"><!--<![endif]-->
<div id="id1">
....
....
</html>
我已经在 IE 9 上打开了这个文件,但是通过检查元素选项检查了 html,但是我的 body 元素没有与之关联的 ie9 类(就此而言没有类)。我在这里错过了什么吗?请帮忙
【问题讨论】:
-
IE 10 绝对不支持条件 cmets,因此
(gt IE 10)不会做太多事情。好在它是默认条件。
标签: html internet-explorer internet-explorer-9 conditional-statements