CSS Index
A. CSS style selector 2
1. Universal Selector--{font-family: "Song body"; declaration2; Declarationn} 2
2. Type selector--p{font-family: "Song Body";} or P1,p2{font-family: "XXFarEastFont-Arial";} A comma represents or means.
2
3. Class--p.code{font-family: "XXFarEastFont-Arial";} 2
4.id--#code {font-family: "Song Body";} 2
Two. Style Sheet 2
1. Inline style sheet 2
2. Internal style sheet 2
3. External style sheet 2
4. Style sheet Priority--Nearest principle 3
Three. Property 3
1. Text 3
2. Text 3
3. Background Properties 4
4. Hyperlink 4
5. Margin Property 4
6. Border Properties 4
Four. CSS Layout 5
1.DIV mark (chunking mark)--
***
5
2. span mark (row mark)--*** 6
3. Div&span Distinction 6
4. Display Property 6
5. @import merged CCTV file 6
A. CSS style selector
1. Universal Selector--{font-family: "Song body"; declaration2; Declarationn}
2. Type selector--p{font-family: "Song Body";} or P1,p2{font-family: "XXFarEastFont-Arial";} A comma represents or means.
3.class--p.code{font-family: "Song Body";}
td.fancy { Color: #f60; Background: #666; } In the example above, the table cell with the class name fancy will be orange with a gray background.
|
|
4.id--#code {font-family: "Song Body";}
#sidebar p {font-style:italic; Text-align:right; Margin-top:0.5em; } |
Two. Style sheet
1. Inline style sheet
2. Internal style sheet
3. External style sheet
An external style sheet is an ideal choice when a style needs to be applied to many pages. In the case of using an external style sheet, you can change the appearance of the entire site by changing a file. Each page is linked to the style sheet using the tag. tags in (document) head:
|
4. Style sheet Priority-proximity principle
Three. Property
1. Text
2. The text
Property |
Describe |
Color |
Set Text color |
Direction |
Sets the direction of the text. |
Line-height |
Sets the row height. |
Letter-spacing |
Sets the spacing between characters. |
Text-align |
The text is aligned. |
Text-decoration |
Add adornments to the text. |
Text-indent |
First line indent. |
Text-transform |
Controls the letters in the element. |
Word-spacing |
Sets the word spacing. |
|
3. Background properties
4. Hyperlinks
Status of A:link when not accessed
Status after a:visited access
A:active the state when the mouse point is not placed
A:hover the state of the mouse row is obsolete
5. Margin Properties
6. Border Properties
Four. CSS Layout
1.DIV mark (chunking mark)--
***
this is a header
this is a paragraph.
this is a header
this is a paragraph.
|
2.span mark (line mark)--***
some Text.some Other text. |
3.div&span Difference
Div will cause a newline, and span will not.
4.display Properties
The Display property sets the type of box that the element should generate.
p.inline {display:inline; } |
Inline is displayed on the same line, none text is not displayed, block linefeed output.
5. @import combined with CCTV documents
You can combine multiple CSS files into a single CSS file.
This article links http://www.cxybl.com/html/wyzz/CSS/20121121/34107.html