What is the difference between the selectors “.class.class” and “.class .class”?

后端 未结 4 618
故里飘歌
故里飘歌 2020-12-12 14:21

What is the different between .class.class and .class .class?

4条回答
  •  难免孤独
    2020-12-12 14:44

    .class.class can also be used avoid the use of !important in case that a higher specificity selector prevents your rule from being applied.

    In this case there are not two classes in an element. You just repeat the class which specificity you want to increase, like

    (HTML) 
    ...
    (CSS) .something.something {}

提交回复
热议问题