开发者

Make element not affected by CSS rules

开发者 https://www.devze.com 2023-02-24 14:20 出处:网络
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 vis

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), b开发者_开发问答ut at the same time retain inherited styles?


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

Something like

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

should work...

0

精彩评论

暂无评论...
验证码 换一张
取 消