Home > Web Front-end > HTML Tutorial > css引入外部css文件的方式简单介绍_html/css_WEB-ITnose

css引入外部css文件的方式简单介绍_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:28:51
Original
1076 people have browsed it

css引入外部css文件的方式简单介绍:
如果css代码较多的话,最好要将其单独存放于一个css文件中,然后将其引入,下面就介绍一下常用的引入外部文件的方式。
方式一:

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

方式二:

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

关于此种方式更多内容可以参阅CSS的@import语法规则一章节。

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