如图效果:
html
<a class="forgot" href="/passport/forget-password">忘记密码</a>
less
.forgot {
display: inline-block;
color: rgba(0, 0, 0, 0.25);
position: relative;
overflow: hidden;
width: 100%;
text-align: center;
&::before {
content: '';
width: 50%;
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
position: absolute;
left: -44px;
top: 11px;
}
&::after {
content: '';
width: 50%;
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
position: absolute;
right: -44px;
top: 11px;
}
}