效果展示![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/4bace150e8ac4f55a68d9f4d59c36a46.gif#pic_center)
源码
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
.title {
display: flex;
justify-content: flex-start;
align-items: center;
&::before,
&::after {
content: '';
transition: 1s;
display: block;
width: 60px;
height: 3px;
background-color: #00ffff;
margin: 5px;
}
&::before {
width: 0;
}
&:hover {
&::before {
width: 60px;
}
&::after {
width: 0;
}
}
}
</style>
<body>
<div class="title">01</div>
</body>
</html>