加入收藏 设为首页 联系站长
WEB2.0教程 | CSS教程 | HTML教程 | 设计素材 | CSS 模板 | CSS酷站欣赏 | CSS布局实例 | Javascript | 建站代码 | 专业软件 | 常见问题 | 内容搜索
>首页 -> CSS布局实例

TOP

解决hr分割线在IE中存在默认边距问题

[ 录入者:admin | 时间:2008-02-03 02:43:48 | 作者: | 来源: | 浏览:0次 ]

解决hr分割线在IE中存在默认边距问题

方便在使用分割线的时候使用hr,尽量不使用border,语意化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></title>
<style type="text/css">
<!--
*{ margin:0; padding:0; }
body{ font:12px/130% Verdana, Geneva, Arial, Helvetica, sans-serif 宋体; text-align:center; }
li{ list-style:none; }
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
.clearfix{display:inline-block;}
.hr1{ height:1px;border:none;border-top:1px solid Black;margin:0;*margin:0 0 -14px 0;float:none;*float:left;display:block;}
.hr2{ height:2px;border:none;border-top:2px solid #C71585;margin:0;*margin:0 0 -14px 0;float:none;*float:left;display:block;}
.hr3{ height:3px;border:none;border-top:3px solid #6B8E23;margin:0;*margin:0 0 -14px 0;float:none;*float:left;display:block;}
div{ height:20px; background:#D3EDF8;}
-->
</style>
</head>
<body>
<div></div>
<hr class="hr1" />
<hr class="hr2" />
<hr class="hr3" />
<div></div>
</body>
</html>

[上一篇]css控制div置顶置底的例子 [下一篇]没有了

评论

称  呼:
内  容:

相关栏目

最新文章

热门文章

推荐文章

相关文章

推荐浏览

中国百度网
安徽皖一月嫂家政
犯罪现场