忽略 IE 的评论标签不起作用
Ignore comment tag for IE doesn't work
screenshot
显示本应从 IE 中隐藏代码的评论标签的屏幕截图显示给所有人。另一个必须为除 IE 之外的其他人隐藏代码的程序不会向任何人显示。
这个回答<!--[if !IE]> not working没有帮助
有什么建议吗?
这是一个示例,可能对您有用
This is for until IE9
<!--[if IE ]>
<style> .someclass{
text-align: center;
background: #00ADEF;
color: #fff;
visibility:hidden; // in case of hiding
}
#someotherclass{
display: block !important;
visibility:visible; // in case of visible
}
</style>
<![endif]-->
This is for after IE9
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
enter your CSS here
}
screenshot
显示本应从 IE 中隐藏代码的评论标签的屏幕截图显示给所有人。另一个必须为除 IE 之外的其他人隐藏代码的程序不会向任何人显示。
这个回答<!--[if !IE]> not working没有帮助
有什么建议吗?
这是一个示例,可能对您有用
This is for until IE9
<!--[if IE ]>
<style> .someclass{
text-align: center;
background: #00ADEF;
color: #fff;
visibility:hidden; // in case of hiding
}
#someotherclass{
display: block !important;
visibility:visible; // in case of visible
}
</style>
<![endif]-->
This is for after IE9
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
enter your CSS here
}