-
-
Save DevTarakanova/a9c2c696ebcb83a89ba13854fb42fba2 to your computer and use it in GitHub Desktop.
КРАСИВОЕ CSS ПОДЧЕРКИВАНИЕ ЭЛЕМЕНТОВ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a{ | |
display: inline-block; | |
position: relative; | |
text-decoration: none; | |
} | |
a::before{ | |
display: block; | |
position: absolute; | |
content: ""; | |
height: 2px; | |
width: 0; | |
background-color: red; | |
transition: width .5s ease-in-out, left .5s ease-in-out; | |
left: 50%; | |
bottom: 0; | |
} | |
a::after{ | |
display: block; | |
position: absolute; | |
content: ""; | |
height: 2px; | |
width: 0; | |
background-color: red; | |
transition: width .5s ease-in-out; | |
left: 50%; | |
bottom: 0; | |
} | |
a:hover::before{ | |
width: 50%; | |
left: 0; | |
} | |
a:hover::after{ | |
width: 50%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#">ссылка</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment