Home > Web Front-end > CSS Tutorial > Two ways to reference css external files

Two ways to reference css external files

不言
Release: 2018-06-11 14:54:11
Original
3915 people have browsed it

Currently there are two ways to reference, one is to reference through the link in the head, and the other is to reference directly through import. The sample code is as follows. Friends who need it should not miss

css external files References can be divided into two types, one is referenced through the link in , and the other is referenced directly through import. The example is as follows
The first reference

The code is as follows:

<link rel="stylesheet" href="/css/mycss.css" />
Copy after login

The second reference

The code is as follows:

@import url(/css/mycss.css)
Copy after login

This kind of reference can place the referenced code in any position

The above is the entire content of this article, I hope it will be helpful to everyone's learning, more related content Please pay attention to PHP Chinese website!

Related recommendations:

Analysis of the cascading mechanism in CSS

How to use CSS to remove the select drop-down arrow

About the problem of modifying the list attribute in CSS list-style to control the li tag style

The above is the detailed content of Two ways to reference css external files. 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