如何用CSS样式画一条居中800象素的虚线

发布网友

我来回答

1个回答

热心网友

<!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>

热心网友

<!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>

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