4

I have a web page with infinite scrolling. I always want to have the vertical scrollbar present so I have added the following style:

html {  
  overflow-y: scroll;   
}

This works in that it shows the scrollbar but it just displays an empty scrollbar, i.e. there is no cursor to allow the user to scroll up or down.

Is it possible to not only display the scrollbar but also have the cursor displaying as well?

4

2 回答 2

9

使html高一点,滚动就会出现

html {
   overflow-y: scroll;
   height: 101%
}
于 2012-07-03T13:51:46.643 回答
0

您提供的信息有限,很难说。您使用什么 javascript/插件来实现无限滚动?

我的直觉是无限滚动可能发生在顶级 html 元素下方的元素中。也许尝试使用浏览器的开发人员工具来识别实际滚动的元素,并应用“overflow-y:scroll;” 到那个。

请注意,您可能会发现它们隐藏垂直滚动条的原因是您使用的插件使其毫无意义。如果系统从页面顶部删除旧元素以免内存不足,则滚动到滚动条顶部可能无法将您带到页面顶部。

于 2012-07-03T13:57:42.927 回答