>> English << | Português | По-русски | ZVON > Tutorials > CSS tutorial |
Intro / Search / ZVON |
>> Example 10 << | Prev | Next | Contents |
If the name of class is not preceeded by element name, than all relevant element are set. The definition with a class with element name has precedence before another one without it.
>> Case 1 <<HTML Source | CSS stylesheet |
---|---|
<div> div: 000 </div> <div class = "aaa"> div: aaa </div> <div class = "bbb"> div: bbb </div> <div class = "ccc"> div: ccc </div> <p> p: 000 </p> <p class = "aaa"> p: aaa </p> <p class = "bbb"> p: bbb </p> <p class = "ccc"> p: ccc </p> | body {background-color: white; color: black}
.aaa {color: red} p.aaa {color: green} div.ccc {color: navy; background-color: aqua} .bbb {background-color: maroon; color:yellow} .ccc {color:blue} |