CSS style Sheets
/* Comment Area */This is a comment area and will not be read
One, style sheet
1, restrained style sheet: directly write into the attribute, with style (style) attribute to specify the display style
Vertical Center line-height height is div height
Horizontal Center Text-align:center
div Horizontal Center: margin:0xp (above) auto
2, embedded style sheet: As a separate area embedded in the Web page, must be written in the head tag inside.
p/* a style sheet named after the tag name, all such tags will be executed/
3. External style sheet: Create a new CSS file to place the style sheet. If you want to call the style sheet in an HTML file, you need to right-click the CSS style sheet in the HTML file and attach the style sheet. The link connection method is generally used.
*/* format works on all labels/margin: margin padding: pitch
Second, selector
1, Tag Selector, with tag name do selector.
p/* a style sheet named after the tag name, all such tags will be executed/
2, class selector, all with "." Beginning.
3. ID (uniquely OK) selector, beginning with "#".
4. Match selector.
(1) Use "," to separate the side-by-side, and two tags to perform one of the styles.
(2) separated by a space, indicating descendants.
. Main p/* in the label of the Class=main, if there is a P tag exists to execute P tag/
(3) filter ".".
p.sp/* the CLASS=SP tag in the label P, execute sp/
A-tag, linked style
A:link hyperlink is pre-state
a:visited Hyperlink post-click Status
A:hover Hover over hyperlinks
A:active When you click the hyperlink
CSS style Sheets