How to use CSS! important changes priority
This article mainly shows you "how to use CSS! important change priority", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use CSS! important change priority" this article.
Let's look directly at an example.
P {
Color:#d9534f! Important;//red
Color:#5bc0de;//lightblue
}
In general, CSS rules usually apply id selector or class selector first, in addition, the "id" selector overrides the "class" selector.
CSS will give priority to styles near the label or styles that are read later, but given keywords! The style of Important will have the highest priority.
! Important can be used on user-defined stylesheets, or user-defined stylesheets if you want to use CSS stylesheets defined on Web.
Let's put it into practice! Important
HTML
What color does it show?
CSS
P {
ColorPlux colors d9534fills importantlyhand hand red
Color:#5bc0de;//blue
}
The above is all the contents of the article "how to use CSS! important change priority". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!