效果图
代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<style>
.box {
height: 20px;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid red;
height: 50px;
}
.line1 {
height: 1px;
background-color: #0765a9;
flex-grow: 0.1;
}
.line2 {
height: 1px;
background-color: #0765a9;
flex-grow: 1;
}
</style>
<body>
<div class="box">
<span class="line1"></span>
<span class="text">
<input type="checkbox" />驾驶员
</span>
<span class="line2"></span>
</div>
</body>
<script>
</script>
</html>