Can a CSS class inherit one or more other classes?

前端 未结 30 3646
挽巷
挽巷 2020-11-22 00:01

I feel dumb for having been a web programmer for so long and not knowing the answer to this question, I actually hope it\'s possible and I just didn\'t know about rather tha

30条回答
  •  孤城傲影
    2020-11-22 00:34

    You can add multiple classes to a single DOM element, e.g.

    Rules given in later classes (or which are more specific) override. So the fourthclass in that example kind of prevails.

    Inheritance is not part of the CSS standard.

提交回复
热议问题