基本上,我想知道这段代码是否可以,
<body id="some_id" <!--[if lt IE 7 ]>class="ie6"<![endif]--> >
</body>
最佳答案
没有。 HTML 注释不能在标签内。尝试:
<!--[if gte IE 7]>--> <body id="some_id"> <!--<![endif]-->
<!--[if lt IE 7]> <body id="some_id" class="ie6"> <![endif]-->
关于html - 我可以在开始标签内包含 IE 条件注释吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3531871/