There are three types of styles in CSS: creators, readers, and user agents, different sources can affect how styles are stacked.
First of all, the creator (author ' S+style) style should be the most familiar to us, if you are a front-end developer, then the styles you write are called the authoring style.
Then is the user agent style (agent ' S+style), the user agent is what we usually say the browser (IE, Firefox, etc.), these browsers will provide some default style, such as Internet Explorer, a purely HTML-coded Web page, We will find that the hyperlink will have a blue foreground color, in fact, the user-agent style, borrowing some plugins we can easily view these default styles (such as Web+developer in Firefox)
Finally, the reader's style (reader ' S+style) is also the easiest to overlook. The so-called readers are naturally browsing the Web users, sometimes these users may not be satisfied with the color of the page, or font size, this time they are through the interface provided by the browser for the site to add reader style.
After the introduction of the source, let's take a look at how to sort by weight and source, based on the weights summarized in the CSS authoritative Guide (third edition P79):
1.+ the style of the author +>+ The style of the reader +>+ the default style of the user agent
2.+ tag for reader style of important declaration (!important) +>+ all styles
Some friends may not understand at first the meaning of the second, in fact, it is a good choice of CSS provides a mechanism, that is, usually, the author style will have the greatest weight, which is what developers want to see, but the user has the ultimate choice, you can pass! Important overrides any style that you want to overwrite.
Three style sources in CSS: creators, readers, and user agents