Home  >  Article  >  Web Front-end  >  What are the ways to introduce css?

What are the ways to introduce css?

一个新手
一个新手Original
2017-09-20 09:15:133117browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn