怎么用css写出一个1px的水平分割线。
发布网友
发布时间:2022-04-25 12:35
我来回答
共4个回答
热心网友
时间:2022-04-20 10:22
<!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>
热心网友
时间:2022-04-20 11:40
<!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>
热心网友
时间:2022-04-20 13:15
<!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>
热心网友
时间:2022-04-20 15:06
<!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>
一像素水平分割线