There are 3 ways to introduce: add defined style attribute value inline, inline call and external link call in the page header,
Difference:
1.link is an xhtml tag, in addition to loading In addition to css, you can also define other transactions such as RSS. @import can only load CSS
2. When link refers to CSS, it is loaded at the same time when the page is loaded. @import requires that the page is fully loaded before loading
3.link is an XHTML tag and has no compatibility issues. @import was proposed in CSS2.1 and is not supported by lower version browsers.
4.link supports using javascript to control the DOM to change the style, but @import does not support it.
The above is the detailed content of What are the ways to introduce css?. For more information, please follow other related articles on the PHP Chinese website!