Is a selector like *+* safe to use?

后端 未结 3 868
自闭症患者
自闭症患者 2021-01-04 11:38

I recently came across this CSS selector while trying to find a way to easily space out major blog elements such as paragraphs and images. An example of its use would be som

3条回答
  •  悲&欢浪女
    2021-01-04 12:17

    You should also consider IE7 bug related to ignoring adjacent-sibling combinator (as well as :first-child pseudoclass) if HTML comment is in place of where IE7 expects to see an element. There is a workaround that removes comments as DOM nodes after page is loaded in IE7.

提交回复
热议问题