CSS element back to default style

后端 未结 2 1342
北恋
北恋 2021-01-24 01:02

Is there a fast way in CSS to remove all of the styles applied to an element? For example, say a tab menu of some sort:

2条回答
  •  不知归路
    2021-01-24 01:42

    In CSS3, yes. You could use the negation pseudo-class:

    .outer:not(#d3) { foo:blee; etc etc }
    

    Too bad CSS3 support is a little lacking at the moment with most browsers...

    With CSS level less than 3, you're screwed. Sorry.

提交回复
热议问题