Above this mind map has been about to understand the four ways to set different points, the following to explain their usage and attention points.
1. Embed style Sheets
<HTML><HEAD><TITLE>CSS four kinds of setting way </title>Operation Result:
2. Embed style Sheets
Operation Result:
3. External style sheet
Css3.html:
LAYOUT.CSS:<pre name= "code" class= "CSS" >p{color:green;background-color:red;border:5px solid blue;font-size:3cm;} B{COLOR:YELLOW;BACKGROUND-COLOR:GRAY;BORDER:4PX solid yellow;font-size:3cm;}
Operation Result:
4. Input style sheet
ONE.CSS:
P{color:yellow;}
TWO.CSS:B{color:yellow;}
THREE.CSS:@import URL (one.css), @import url (two.css);p {font-size:1cm;border:2px solid green;} B{FONT-SIZE:1CM;BORDER:2PX solid Green;}
Css4.html:
Operation Result:
Finally say a little bit about the priority of the four settings: this does not use the code as an example, you can experiment with their own simple.
The inline style sheet takes precedence over the other three, and the other three priorities are in the load order, first loaded first run.