Defining style Sheets
1 HTML tag definition
<p>...</p>
P{Property: Property value; Property 1: Property value 1}
P can be called a selector, defining the style in which the content in that tag executes
A selector can control a number of style attributes, and they need to use English ";" Separated, the last one can not be added
2 class definition
<p class= "p" >...</p>
The class definition is in "." Begin
. p{property: Property value; Property 1: Property value 1}
3 ID Definition
<p id= "p" >...</p>
The ID definition starts with "#"
#p {property: Property value; Property 1: Property value 1}
4 Priority issues
id>class>html
At the same sibling, select the closest one to the element, for example: #p {color:red} #p {color: #f60} Performs a color of #f60
5 Combo Selector (simultaneous control of multiple elements)
h1,h2,h3{font-size:14px;color:red;}
Select a combination to use "," to separate
6 pseudo Element Selector
a:link style of normal connection
A:hover the mouse to put up the style
A:active style When you select a link
A:visited the style of the link that has been visited
CSS Cascading Style Sheets--defining style sheets