问题:
Cause:
The root cause is Safari's recent implementation of the level 4 :not() selector, which allows complex selectors as arguments. Chrome and Firefox, on the other hand, only support single-level arguments in the current version of :not().Explanation:
A complex selector includes multiple compound selectors separated by combinators (e.g., descendant, sibling).在这种情况下,“ p div”是一个复杂的选择器,由两个化合物选择器(“ p”和“ div”)组成,由后代组合分隔。em:not(div) { color: red } em:not(p div) { color: blue }很少,这会导致Chrome and Firefox和Firefox最终最终达到一致,从而导致浏览器跨浏览器的一致行为。在此之前,开发人员在使用以下情况时应了解潜在的差异:NOT()选择器在这些浏览器中具有多个级别。
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3