raw*_*rrr 9 html internet-explorer internet-explorer-6
我试过了:
<!--[if lt IE 6.0]>
HTML TO HIDE FROM IE6
<![endif]-->
Run Code Online (Sandbox Code Playgroud)
但不幸的是,这些东西也从firefox中隐藏起来.有人有方法吗?我希望这些东西只能在IE6中隐藏
谢谢
Nat*_*wne 19
实际上,您可以使用条件注释来隐藏Internet Explorer中的内容,这与deceze的答案相反.这些类型的条件注释称为" Downlevel Reveal Conditional Comments ".(这些与用于向Internet Explorer显示内容的注释不同,后者更为常见,这些注释称为"下层隐藏条件注释")
<!--[if lte IE 6]><![if gte IE 7]><![endif]-->
<!-- This is a bit mad, but code inside here is served to everything
except browsers less than IE7, so all browsers will see this -->
<!--[if lte IE 6]><![endif]><![endif]-->
Run Code Online (Sandbox Code Playgroud)
但是,如果您已经使用下层隐藏的条件注释来向IE6显示IE6样式表,那么您可能最好用CSS隐藏它.
我希望这有帮助.