考虑这些类:
.bio-target-measure {
opacity: 1;
}
.bio-target-measure:not(.lowerThird-25.lowerThird-active):not(.lowerThird-50.lowerThird-active):not(.lowerThird-100.lowerThird-active):not(.middleThird-25.middleThird-active):not(.middleThird-50.middleThird-active):not(.middleThird-100.middleThird-active):not(.upperThird-25.upperThird-active):not(.upperThird-50.upperThird-active):not(.upperThird-100.upperThird-active):not(.bud-25.bud-active):not(.bud-50.bud-active):not(.bud-100.bud-active) {
opacity: 0 !important;
}
Test
而这些jQuery调用:
var measures = $('.bio-target-measure'); measures.length; // evaluates to 1. measures.is('.bio-target-measure:not(.lowerThird-25.lowerThird-active):not(.lowerThird-50.lowerThird-active):not(.lowerThird-100.lowerThird-active):not(.middleThird-25.middleThird-active):not(.middleThird-50.middleThird-active):not(.middleThird-100.middleThird-active):not(.upperThird-25.upperThird-active):not(.upperThird-50.upperThird-active):not(.upperThird-100.upperThird-active):not(.bud-25.bud-active):not(.bud-50.bud-active):not(.bud-100.bud-active)'); // evaluates to true. var emptyMeasures = $('.bio-target-measure:not(.lowerThird-25.lowerThird-active):not(.lowerThird-50.lowerThird-active):not(.lowerThird-100.lowerThird-active):not(.middleThird-25.middleThird-active):not(.middleThird-50.middleThird-active):not(.middleThird-100.middleThird-active):not(.upperThird-25.upperThird-active):not(.upperThird-50.upperThird-active):not(.upperThird-100.upperThird-active):not(.bud-25.bud-active):not(.bud-50.bud-active):not(.bud-100.bud-active)'); emptyMeasures.length; // evaluates to 1.
但是满足选择器的这种元素的不透明度opacity: 0 !important;
(正如使用jQuery看到的)是1.我的谷歌浏览器(47.0.2526.106,Ubuntu 15.04,64bits)浏览器仅使用第一条规则(唯一的是澄清:不透明度0的规则不存在但覆盖:匹配中完全不存在.
问题:是:不规则(我使用它)一个有效的CSS选择器?我知道它适用于jQuery,但我问的是CSS.