D
D
Daniil Kasyanov2020-04-25 11:58:32
css
Daniil Kasyanov, 2020-04-25 11:58:32

How to remove the “jerking” of the site due to the exit element?

Good afternoon. There is a section of cards that enlarge and show additional text when hovered over. But there is a problem - when hovering, the site starts to "twitch" horizontally, as the height of the card increases, a scroll appears. How can this problem be solved? Thank you.

https://jsfiddle.net/Kasyanov10/kmnzs4b5/10/

PS: This is not visible in jsfiddle, but if you paste it into the editor and run it in Chrome, then the twitching is visible.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hzzzzl, 2020-04-25
@hzzzzl

so-so solution, but

body {
  overflow-y: scroll;
}

How else? the scrollbar will appear, that is, the size of the body will decrease
as an option, display this text in a block with position:absolute on hover, as Wikipedia does for example when hovering over links, but this is not

M
marahkro11, 2020-04-25
@marahkro11

You can turn off the scroll when loading the page, and turn it on when the page is fully loaded.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question