0

Basically, I have a scrolling div. I want the div to scroll obviously, but once scrolled all the way to the bottom, if the user continues to scroll, I don't want the page itself to scroll. Basically, when the mouse is in the div, I want the scrolling to be only within the div, and then when the mouse is outside of the div i want the page to scroll. Is there any way of doing this? I'm using jquery for other aspects of the site as well so I have that if it helps.

4

1 回答 1

0

好吧,我唯一能看到发生的事情是,当您移入 div 时,焦点未设置为 div,而当您移出时,焦点未设置。

示例 JavaScript:

<div onMouseOver="JavaScript:this.focus();" onMouseOut="JavaScript:this.blur();">

此外,请确保您的 Div 的 CSS 类具有以下特定顺序:

overflow: auto;
overflow-y: scroll;
于 2013-04-04T23:37:48.857 回答