First, the meaning of CSS
Cascading style sheets, a markup language that controls page styles and allows the separation of style information from Web page content. The latest version of CSS is CSS3.
Ii. several styles of control methods ( nearest principle )
1. Inline style
<body>
<div style= "color:red;" ></div>
</body>
2. Inline style
<title> This is inline style </title>
<style type= "Text/css" >
div{
color:red;
}
</style>
3. LINK Type
<link rel= "stylesheet" type= "Text/css" href= "Base.css"/>
4. Import (almost unused)
<style>
@import URL (1.css)
</style>
Third, CSS Selector
1. Tag Selector
div{
width:200px;
height:300px;
color:red;
}
2. Class Selector
. c1{
width:200px;
height:300px;
color:red;
}
<div class= "C1" ></div>
3. ID selector (unique)
#d1 {
width:200px;
height:300px;
color:red;
}
<div id= "D1" ></div>
Priority: Label <class<id
Four, font style (inheritance)
div{
font-size:14px;
Font-family: "Microsoft Jas Black";
Color: #FF0000;
Font-weight:bold;
Text-decoration:underline;
Text-decoration:overline;
Text-decoration:line-through;
}
Five, CSS comments
/* Comment */
CSS Cascading style sheet (i)