css| Design | Web page design
first, use the Style property
Add the STYLE attribute directly to the individual component label, the component (label) style= Property 1: Set value 1; Property (Attribute) 2: Set value 2; ...}
For example:
The advantage of this usage is that it can be used neatly in each label, but the disadvantage is that there is no "uniformity" of the whole document.
second, use the style label
Write style rules in label.
For example:
Typically, the entire structure is written in the part of the Web page. The advantage of this usage is the uniformity of the entire document, as long as the declared component will apply the style rule. The disadvantage is that the flexibility of individual components is insufficient.
third, use link tag
Write style rules in the style file of the. css, and then introduce them with the tag.
Let's say we put the style rules into a example.css file and we just add them to the page.
You can apply this style file to a good style. Typically, you write a link label in the section of a Web page. The advantage of this usage is that you can assign several files of the same style rule to the same style file. Disadvantages are also insufficient flexibility in individual files or components.
Iv. introduction of using @import
Similar to link usage, but must be placed in the .
For example:
Note that the semicolon at the end of the line is absolutely indispensable!
V. Introducing styles using the tag
For example: page