怎么用css写出一个1px的水平分割线。

发布网友

我来回答

4个回答

热心网友

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分割线</title>
<style type="text/css">
div {
 height:1px;
 width:100%;
 background:#00CCFF;
 overflow:hidden;
 }
</style>
</head>
<body>
<div> </div>
</body>
</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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分割线</title>
<style type="text/css">
div {
height:1px;
width:100%;
background:#00CCFF;
overflow:hidden;
}
</style>
</head>
<body>
<div> </div>
</body>
</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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>横线代码</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:295px;
height:50px;
z-index:1;
left: 10px;
top: 183px;
}
-->
</style>
</head>

<body>
<hr align="center" width="500" size="50" color="#FF0000"/>
<hr align="center" width="300" size="30" color="#000000"/>
<hr align="center" width="100" size="1" color="#00ff00"/>
<hr align="center" width="300" size="1" color="#0000FF"/>
<hr align="center" width="500" size="1" color="#FF00"/>
<hr align="center" width="500" size="1" color="#FF00"/>
删除线删除线删除线删除线删除线删除线删除线
<div id="Layer1">
<hr align="center" width="500" size="1" color="#000000"/></div>
</body>
</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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分割线</title>
<style type="text/css">
div {
height:1px;
width:100%;
background:#00CCFF;
overflow:hidden;
}
</style>
</head>
<body>
<div> </div>
</body>
</html>

一像素水平分割线

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com