效果图
![](https://i-blog.csdnimg.cn/blog_migrate/cc77840fef2477c7149bf9d76f81a725.png)
代码
<!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">
<s