リンクの下線をアニメートするコードが見つかりましたが、私は実際には反対である(左から右に)読むので、私は他の方向になりたいと思います。ここでJSFiddleCSSのアンダーラインアニメーション - 読み取り方向
.sliding-u-l-r-l-inverse {
display: inline-block;
position: relative;
padding-bottom: 3px;
}
.sliding-u-l-r-l-inverse:before {
content: '';
display: block;
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 100%;
transition: width 0s ease;
}
.sliding-u-l-r-l-inverse:after {
content: '';
display: block;
position: absolute;
right: 0;
bottom: 0;
height: 3px;
width: 100%;
background: blue;
transition: width .8s ease;
}
.sliding-u-l-r-l-inverse:hover:before {
width: 0%;
background: blue;
transition: width .8s ease;
}
.sliding-u-l-r-l-inverse:hover:after {
width: 0%;
background: transparent;
transition: width 0s ease;
}
<div class="sliding-u-l-r-l-inverse">
I want it to slide on the other direction.
</div>
@Leshautsdurant。 – frnt
完璧に働いて、ありがとう! –
ようこそ@Leshautsdurant :-) – frnt