T
T
Taras Vladychko2021-06-10 17:48:56
css
Taras Vladychko, 2021-06-10 17:48:56

How to make a line with a hover effect above the previous line?

60c2238bb1962542288921.jpeg

Sorry for the picture quality. There is a dark line at the bottom of the block. But it is necessary that when hovering, a line of a different color appears under the text. And the hover line should overlap the dark one. I could not find information on the Internet. Thanks for answers.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ankhena, 2021-06-10
@Cyborg00001

A pseudo-element on top of the border of the parent block
In a simple way https://jsfiddle.net/y9o8eszh/
Positioning options can be different.
Another option https://jsfiddle.net/s201xbu8/

A
Anton Neverov, 2021-06-10
@TTATPuOT

Make a border-buttom on the element you hover over.
The bar below all elements is the parent element's full-length border-bottom.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question