首页 > Web开发 > 详细

css控制水平衡线hr标签样式去掉其阴影效果

时间:2016-01-15 22:12:55      阅读:154      评论:0      收藏:0      [点我收藏+]
html中水平衡线hr默认高度是两个像素,其中border-top高1px,且颜色为黑,border-bottom高1px颜色为灰,这时看着是阴影效果

去掉阴影效果很简单,只需在css里把border-bottom或border-top属性设置一个为none即可。

复制代码
代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type = "text/css">
.hrtest{
height:20px;
width:50px;
border-top:1px solid red;
border-left:none;
border-right:none;
border-bottom:none;
}
</style>
</head>
<body>
<hr class = "hrtest">
</body>
</html>

css控制水平衡线hr标签样式去掉其阴影效果

原文:http://www.jb51.net/css/197161.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!