T
T
Tonykark95972021-08-06 18:23:47
css
Tonykark9597, 2021-08-06 18:23:47

How to make the borders of an element appear smooth on hover?

The element has a hover stroke of 2px, but for some reason the appearance works clumsily. It first appears at 1px and then increases to 2px.

I do everything with the Divi theme on wp, I tried the stroke through the standard module settings, it’s very crooked.
Through your css for the module is smoother, but still, first 1px, and then 2px.

Code like this:

border: 2px solid #2b9d82;
transition: all 0.1s linear;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima, 2021-08-10
@Tonykark9597

vot) Tonykark9597

div{
 border: 2px solid transparent;
transition: all 0.1s linear;
}
div:hover{
 border: 2px solid #2b9d82;

}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question