如何用CSS样式画一条居中800象素的虚线
发布网友
发布时间:2022-04-23 14:08
我来回答
共1个回答
热心网友
时间:2023-10-17 13:08
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>_</title>
<style type="text/css">
.line{
width:800px; position:absolute; left:50%; top:50%; margin-left:-400px; height:0; overflow:hidden; border-bottom:1px dashed #000;
}
</style>
</head>
<body>
<div class="line"></div>
</body>
</html>
热心网友
时间:2023-10-17 13:08
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>_</title>
<style type="text/css">
.line{
width:800px; position:absolute; left:50%; top:50%; margin-left:-400px; height:0; overflow:hidden; border-bottom:1px dashed #000;
}
</style>
</head>
<body>
<div class="line"></div>
</body>
</html>