Css使用多个样式表问题

时间:2015-09-14 08:49:53

标签: html css

在简单的html页面中,我们可以使用以下内容:

<style type="text/css">
a {text-decoration:none;}
 a { color: inherit; } 
/*----------Text Styles----------*/
.ws72 {font-size: 88px;}
.ws74 {font-size: 93px;}

.wpmd {font-size: 13px;font-family: Arial,Helvetica,Sans-Serif;font-style: normal;font-weight: normal;}
/*----------Para Styles----------*/
DIV,UL,OL /* Left */
{
 margin-top: 0px;
 margin-bottom: 0px;
}
</style> 

像classess一样:

<div>
 <font class="ws72" >
      </div>

另一个像:

<div class="wpmd">
      <div>

这些都是相同的页面css,现在我怎么能使用类似的东西:

<link href="example.com/better.css" rel="stylesheet" type="text/css">  for class .ws72 

并且喜欢:

<link href="example.com/best.css" rel="stylesheet" type="text/css">
for .wpmd

1 个答案:

答案 0 :(得分:0)

首先,您使用的是像<font>这样的旧html标记,现在已弃用。所以,我建议你不要使用那个标签。

对于你的问题,你不需要分开样式表,但你可以在单个样式表中添加多个样式规则,如果页面有一个类,那么样式表将使用它,同样的东西适用于其他页面。