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 followsThe code is as follows:
<link rel="stylesheet" href="/css/mycss.css" />
The second reference
The code is as follows:
@import url(/css/mycss.css)
This kind of reference can place the referenced code in any
positionThe 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!