Style overlay order in CSS style sheets--Iteye technology website
http://spartan1.iteye.com/blog/1526735
Focus on the induction:
Find some textbooks (w3schools, etc.), just say that the order of the CSS is "style on the element" > "style element on file header" > "External Style File", but the precedence of multiple same styles in the style file is not explained in detail. After testing and continuing the search, you know that the priority is listed as follows:
Or the following can also be called a number of priority principles (by Liwei 20140803)
1. The more precise the element selector selection of a style sheet, the higher the style precedence :
The ID selector Specifies the style > class selector for the specified style > element type selector for the specified style
So in the example above, #navigator的样式优先级大于. Current_block priority, even if. Current_block is newly added and does not work.
2. For styles specified by the same type selector, the higher the precedence in the style sheet file
Note that this is the higher priority in the style sheet file, rather than the order in which the element class appears. (See the original for a specific example).