The first style sheet is available (1) embedded style sheet (2) Introduction style sheet, two ways to achieve,
I'll put this in the form of code below:
(1) Embedded style sheet
Demo.html
<!doctype html>
(2) Introduction style sheet
demo.html
<!doctype html>
Style.css
body{ Background-color:yellow; Color: #fff } p,h1,h2,.p1, #pid {color:red;font-size:20px;} /* Combo Style definition */ a:link {color:red;} /* Show Red */ a:hover {color:green;}/* Mouse move to green */ a:active {color:yellow;}/* Mouse click the time when yellow */ a:visited {Colo R:blue; }/* The mouse click on the place to change to blue * /div{background:red;font-size:20px} /* HTML style definition * /. Div1{background-color: green;font-size:20px;} /* Class Style definition */ #divid {background-color:blue;font-size:20px;} /* ID Style definition */
The above is the CSS folding style (2)-Define the content of the style sheet, more relevant content please follow topic.alibabacloud.com (www.php.cn)!