How to create a css rule for all elements except one class?

前端 未结 3 867
慢半拍i
慢半拍i 2020-12-04 17:22

I have created a CSS stylesheet for my project. Is there any way I can create a css rule that applies to all table elements EXCEPT table elements belonging to the class \"do

3条回答
  •  温柔的废话
    2020-12-04 17:51

    The negation pseudo-class seems to be what you are looking for.

    table:not(.dojoxGrid) {color:red;}
    

    It's not supported by ≤ IE8 though.

提交回复
热议问题