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&NBSP;HTML><HTML><HEAD>&NBSP;&NBSP;&NBSP;&NBSP;<TITLE>CSS Style Use </title> <meta charset= "Utf-8" > <link rel= "stylesheet " type=" Text/css " href=" Style.css ">
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 to change yellow */a:visited {color:blue;}/* Mouse Click here to change the 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 */
This article is from "Sour milk" blog, please make sure to keep this source http://wengmengkai.blog.51cto.com/9016647/1825577
CSS folding Style (2)--Define style sheet