A
A
Ainur Shakirov2018-07-28 12:59:28
css
Ainur Shakirov, 2018-07-28 12:59:28

Overflow hidden for body, how not to jump to the site header?

To prevent the modal window from scrolling behind, I set the body overflow hidden, but in this case the user is thrown to the very top.
Is it possible to somehow hide the scrollbars (disable them) but still leave the user in the current position relative to the content? Is it possible to somehow move (on js) the visible area with overflow hidden?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2018-07-28
@Fqyeh29

By itself, this property will not re-flip the page
https://codepen.io/anon/pen/VBrjLv
You are re-flipping due to other styles or scripts. Find out what is causing it and fix the problem.
This is also possible. Controlled by the scroll of the element, more specifically the scrollTop/scrollLeft property

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question