CSS定义HR水平线的几种样式

王朝学院·作者佚名  2009-08-11
窄屏简体版  字體: |||超大  

对于CSS定义<hr />水平线标签,常用的有以下几种样式,仅供参考。对于

程序代码

height:1px;border:none;

的主要用途就是Css Reset,关于Css Reset可以搜索下博客里其他文章介绍。

HTML代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>CSS定义HR水平线</title>

<style type="text/css">

<!--

.hr0{ height:1px;border:none;border-top:1px dashed #0066CC;}

.hr1{ height:1px;border:none;border-top:1px solid #555555;}

.hr2{ height:3px;border:none;border-top:3px double red;}

.hr3{ height:5px;border:none;border-top:5px ridge green;}

.hr4{ height:10px;border:none;border-top:10px groove skyblue;}

-->

</style>

</head>

<body>

<hr class="hr0" />

<hr class="hr1" />

<hr class="hr2" />

<hr class="hr3" />

<hr class="hr4" />

</body>

</html>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航