C s Sound Ming Form
This section will begin to introduce you to CSS applications. Of course, how to introduce how to build a style sheet, including a statement, a method of declaration, and a method of applying on the webpage, and finally an overview of some of the features of CSS. Summary, there are three ways to declare the CSS: 1. Basic statements: the most typical CSS declaration.
Element {property: value} is expressed in Chinese, that is,
Component (Label) {Nature (Properties) Name: Settings}
E.g:
H3 {color: blue} is a set of declarations.
Second, the collective statement: a group or array pattern rule (nature) (nature) (nature) (nature) (nature) (nature) (nature) in a comma (tag) is also declared (label) (nature).
Component (label) {
Nature (attribute) Name 1: Set value 1;
Nature (Properties) Name 2: Set value 2;
...}
Or
Component A (label a), element B (label B), component C (tag C), ... {
Nature (attribute) name 1: Set value 1;
Nature (Properties) Name 2: Set value 2;
...}
E.g:
Td {
Color: blue;
FONT-SIZE: 9PT;
}
Or
TD, P, DIV {
Color: blue;
FONT-SIZE: 9PT;
}
Third, the sub-declaration: Packets of many styles rules are declared separately.
Component A (Label a) {Nature (Properties) Name 1: Set value 1; Nature (Properties) Name 2: Setting value 2;}
Component A (Label a) {Nature (Properties) Name 3: Setting Value 3; Nature (Properties) Name 4: Setting value 4;}
E.g:
TD {color: blue; font-size: 9pt}
TD {font-family: "Standard"; line-height: 150%}
Such a statement is not in contact with each other because the nature of the declaration is different. If you accidentally make a duplicate statement on the same nature, only the set value of the later declaration will act.
Together, you will be accepted in your statement, as long as your format is correct, and whether you are case, blank or wrap does not affect the results of the display, you can write your own habits. .
Application method for C s S
Next, you will introduce you to the four basic methods of applying the established style table on the web page. First, use the style attribute: add the Style property directly in the individual component tag.
The advantage of this usage is that the style is in a pattern in each tag, but the disadvantage is "unified" without the entire file.
Second, using the style tag: Write the style rules in the