add growing

This commit is contained in:
soragui 2023-01-08 16:46:28 +08:00
parent 8ce8ae4609
commit cdab208973
2 changed files with 25 additions and 0 deletions

View File

@ -17,6 +17,7 @@
<ul>
<li><a class="slidinglink" href="#">Sliding Link</a></li>
<li><a href="#" class="swappinlink" data-replace="See"><span>Go</span></a></li>
<li><a href="#" class="growinglink"> Cool </a></li>
</ul>
</div>

View File

@ -43,6 +43,7 @@ a {
width: 100%;
left: 0;
}
.swappinlink::before {
background-color: #54b3d6;
height: 2px;
@ -76,4 +77,27 @@ a {
.swappinlink:hover span {
transform: translate3d(-200%, 0, 0);
}
/**/
.growinglink {
text-decoration: none;
position: relative;
}
.growinglink::before {
content: '';
background-color: hsla(196, 61%, 58%, .75);
position: absolute;
left: 0;
bottom: 3px;
width: 100%;
height: 4px;
z-index: -1;
transition: all .3s ease-in-out;
}
.growinglink:hover::before {
bottom: 0;
height: 100%;
}