Make element not affected by CSS rules

喜欢而已 提交于 2020-01-14 14:58:32

问题


My google chrome extension needs to wrap content of certain elements on page user is browsing into custom element, say, <xelem>original content</xelem>. This change should not make any visible effect.

Is it possible to make <xelem> NOT affected by * css rules (or any other rules that might apply to it), but at the same time retain inherited styles?


回答1:


Considering you are working with css3, have a look at the :not pseudo-class.

Something like

:not(xelem) {
    /* ... */
}

should work...



来源:https://stackoverflow.com/questions/5667228/make-element-not-affected-by-css-rules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!