O
O
oleja1872016-05-16 07:40:40
Design
oleja187, 2016-05-16 07:40:40

How to highlight menu buttons with a line?

Attention programmers. Good day! How to easily write code to highlight menu buttons? When you hover over the cursor, dynamic bottom and top lines appear as shown in the figure. Thank you in advance for your help.
e39fb250d54242179f05adf380b981e7.pngrefur.tefox.net

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Lumen, 2016-05-16
@Maximum_Live

Do you need the menu items to be like in the picture? c top and bottom were white stripes?

N
Nicholas, 2016-05-16
@healqq

Learn to use the console:
Normal style:

left: 50%;
right: 50%;
content: "";
position: absolute;
top: 0;
bottom: 0;
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
-webkit-transition: all 200ms ease-out;
transition: all 200ms ease-out;
opacity: 0;

On hover:
left: 0;
right: 0;
width: auto;
opacity: 1;

Usually all these things are hung on :before/:after elements, in the web inspector you can trigger "hover" events by clicking on the element and it's very easy to find out how something is done.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question