&__link {
position: relative;
display: block;
padding: 6px 0;
text-transform: uppercase;
transition: all 0.2s ease-in-out;
color: $main-text-color;
&:before {
content: '';
display: block;
position: absolute;
left: 0;
right: 0;
top: 0;
height: 3px;
opacity: 0;
background-color: $head-color;
transform: translateY(-10px);
transition: all 0.2s ease-in-out;
}
&:hover:before,
&--active:before {
opacity: 1;
transform: translateY(0);
}
}
link with hover top line
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.