Home > Article > Web Front-end > Why does the class class in css have two names? Or what does it mean? _html/css_WEB-ITnose
What does it mean to write 2 names in a css class?
<div class="path cl"></div>
You can have multiple class definitions act on the node. If there are the same attributes, the later ones will overwrite the previous ones.
allows multiple class definitions to act on the node. If they have the same attributes, the latter one will overwrite the previous one.
<style type="text/css"> .m{background-color: red;} .xj{background-color: blue;} .xskd{background-color: mediumaquamarine;}</style><div class="m xj xskd"> <p>Hello</p></div>