1. Precedence of CSS Styles
There are many ways to use CSS styles in HTML
<link href= "Ho.css" rel= "stylesheet" type= "text/css"/> External reference method
CSS style statements that control HTML directly from the
You can directly write CSS to control the tags you want to control.
Priority words:
Lowest browser Default Style
External reference Style second
The second in the head tag
Highest priority in the label you want to control
2. You can group selectors together
H1,h2,h3,h4,h5{color:green}
The middle needs to be separated by numbers, so they'll have a uniform pattern.
The same element can also give him different attributes such as:
P.right{text-align:right}
P.center{text-align:center}
Above this is the CSS style that controls the HTML statements below
The statements in HTML are:
<p class= "Right" > It is right</p>
<p class= "Center" > This is center </p>
This assigns a different class name to the P element, which allows you to control the different styles of the same element through the name of the class.
3. Browser support for CSS
Now css3.0 has a lot of great results, but some browsers do not support CSS style, such as IE
css3.0 style of some IE9 are not supported, we now use the system is generally IE7 8 9 browser. It's too painful for development.
However, the powerful Firefox, almost all the style of the browser support, as well as Google is a very good browser, running speed should be the fastest, as well as our domestic 360 browser, he used the IE kernel, basically decided its fate. To do development, we often use the browser is Firefox Google and IE can not be used because IE does not support the need to use it to debug compatibility.
Firefox Firebug plug-in is good, can be used to debug CSS style code at the front desk, changed the foreground automatically modified, do not need to change the CSS style every time you have to refresh the next page. This gives the front desk more work efficiency.