Using multiple classes in one element and specificity

后端 未结 4 979
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-12 12:30

Just wondering when you use multiple classes on the one element such as class=\"foo bar\" and those classes are setup as below:

.foo {
    margin-ri         


        
4条回答
  •  遥遥无期
    2021-02-12 12:45

    Also, if you wish to target the element who has only both classes, you can use this syntax:

    • Something
    • Somthing else
    • Something more
    .foo { color: red; } .foo.first { color: blue }

提交回复
热议问题