有没有办法让IE:not()选择器在IE和Chrome中运行?

phi*_*lle 4 css internet-explorer google-chrome css-selectors css3

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

例如,这适用于Firefox: iframe:not(.anifrmclass){}

干杯!

Bol*_*ock 9

特异性是你的朋友.将:not(.anifrmclass)样式应用于所有<iframe>s然后覆盖其他值<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;
}
Run Code Online (Sandbox Code Playgroud)