当前位置导航:炫浪网>>网络学院>>网页制作>>HTML与CSS教程

一个页面如何调用多个css

<link rel="stylesheet" href="css/home.css" type="text/css" media="screen" title="Web Site Style" />
<link rel="alternate stylesheet" href="css/print.css" type="text/css" media="screen" title="Print Preview" />
<link rel="stylesheet" href="css/print.css" type="text/css" media="print" />

其中:
home.css

@import url(layout.css);
@import url(typography.css);
@import url(design.css);
@import url(design-home.css);

上面是英文网站的典型用法,其中前三个是每个页面共用的,layout是布局,typography是字体相关的,design是其他的一些表现设计,而design-xxx是针对于某个页面独有的设计,比如design-home是针对于首页的设计。

对于中文的网站,个人认为可以把typography合到design里面,因为中文页面上的字体一般就是宋体,没必要单独用一个css来定义.
相关内容
赞助商链接