CSS
样式
a:hover {
color: rgb(69,86,103);
}
a:before {
content: " ";
position: absolute;
width:100%;
height: 2px;
bottom: -.3rem;
left: 0;
background-color: rgb(69,103);
visibility: hidden;
transform: scaleX(0);
-webkit-transform: scaleX(0);
transition: all 0.3s ease-in-out;
-webkit-transition: all 0.3s ease-in-out;
}
a:hover:before {
visibility: visible;
transform: scaleX(1);
-webkit-transform: scaleX(1);
}
HTML
页面