class overrule when two classes assigned to one div

前端 未结 5 583
情话喂你
情话喂你 2020-12-13 01:45

I was creating a

tag in which I wanted to apply two classes for a
tag which would be a thumbnail gallery. One class for its
5条回答
  •  悲哀的现实
    2020-12-13 01:52

    Actually, the class that defined last in the css - is applied on your div.

    check it out:

    red last in css

    .blue{ color: blue; }
    .red { color: red;  }
    blue red
    red blue

    vs

    blue last in css

    .red { color: red;  }
    .blue{ color: blue; }
    blue red
    red blue

提交回复
热议问题