1. Use the STYLE attribute: Add the STYLE attribute directly to individual component tags.
The advantage of this usage is that it can flexibly apply styles to each tag, but the disadvantage is that there is no entire document. Unity'.
2. Use the STYLE tag: Write the style rules in the tag.
For example:
Usually the entire structure is written in the
section of the web page. The advantage of this usage lies in the uniformity of the entire document. As long as there is a declared component, the style rule will be applied. The disadvantage is the lack of flexibility in individual components.Suppose we save the style rules as an example.css file, we only need to add
to the web page to apply it The style specified in the style file. Usually the LINK tag is written in the
4. Use @import to introduce: It is very similar to LINK usage, but must be placed in .
For example:
To Note that the semicolon at the end of the line is absolutely essential!
For more introduction to the four ways to introduce css style sheets, please pay attention to the PHP Chinese website for related articles!