码迷,mamicode.com
首页 > Web开发 > 详细

添加CSS的四种方式

时间:2014-12-28 00:24:23      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:

1、直接添加在HTML的标识符(标签)里:
 <p style="color: blue;font-size: 12pt">样式</p>


2、添加在HTML的头信息标识符<head>里:
 <head>
 <style type="text/css">
 ……
 </style>
 </head>


3、连接样式表:
 <head>
  <link rel="stylesheet" href="*.css" type="text/css">
 </head>


4、联合使用样式表:
 <head>
 <style type="text/css">
 <!--
  @import"*.css"
  其他样式表的声明
 -->
 </style>
 </head>

添加CSS的四种方式

标签:

原文地址:http://www.cnblogs.com/daimaku/p/4189384.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!