<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box {
width: 500px;
height: 500px;
border: 1px solid red;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: black;
}
.line1 {
width: 30%;
position: absolute;
/* position: relative; */
border-bottom: 2px solid rgba(255, 255, 255, 0.5);
z-index: 2;
}
.line2 {
width: 20%;
border-bottom: 4px solid white;
/* margin-top: -1px; */
position: absolute;
z-index: 1;
}
</style>
</head>
<body>
<div class="box">
<div class="line1">
</div>
<div class="line2"></div>
</div>
</body>
</html>
css重叠线
最新推荐文章于 2023-11-30 11:46:10 发布