开发者

How do I prevent selection scrolling in the body

I have divs that are placed off-screen.

I have disabled scrollbars like so:

body {
overflow: hidden;
}

Currently, when I highlight text and drag the mouse outside the window, the body still scrolls.

How can I prevent this behaviour? (Setting offscreen elements 开发者_运维知识库to display: none is not an option.)

Thanks!

Travis


What browser is this happening in?

Where, off-screen, are the divs positioned? If they are off to the left or right, you could try using a negative top margin instead, as users are unlikely to highlight "up".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜