When it comes to selectors, I only know that class selection conforms to the ID selector, but I am not very clear about the priority of the selector. Below, excerpt from the example in the book:
Set the !important keyword statement on the attribute to increase the weight of the attribute. Properties declared with the !important keyword have the highest priority.
Example:
p{ color:blue; }
p .myColor{color:black;}
.myColor{color:yellow;}
#myColor{color:red;}
p=1
p .myColor=1 10=11
.myColor=10
#myColor=100
style="color:green;"=1000
The color labeling part is easy to make mistakes. I always thought that the color of the second label had a higher priority. .