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

What are the ways to introduce css?

一个新手
Release: 2017-09-20 09:15:13
Original
3159 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template