CSS element back to default style

后端 未结 2 1334
北恋
北恋 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.

    0 讨论(0)
  • 2021-01-24 02:04

    No. Not feasibly possible. Just override it.

    0 讨论(0)
提交回复
热议问题