有什么办法得到的CSS:not()选择器工作在IE和Chrome? [英] Is there any way to get the CSS :not() selector working in IE and Chrome?

查看:193
本文介绍了有什么办法得到的CSS:not()选择器工作在IE和Chrome?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道在IE和Chrome中使用CSS :not() 选择器的任何技巧?

Anyone know any tricks to use the CSS :not() selector in IE and Chrome?

例如这在Firefox中有效: iframe:not(.anifrmclass){}

e.g. this works in Firefox: iframe:not(.anifrmclass){}

干杯!

推荐答案

特殊性是你的朋友。将:not(.anifrmclass)样式应用于所有< iframe> ,然后覆盖< iframe class =anifrmclass>

Specificity is your friend. Apply your :not(.anifrmclass) styles to all <iframe>s then override with other values for <iframe class="anifrmclass">.

iframe {
    /* Styles for all -other- iframes */
    display: none;
}

iframe.anifrmclass {
    /* Override for this class with values other than the above */
    display: inline-block;
}

这篇关于有什么办法得到的CSS:not()选择器工作在IE和Chrome?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆