滚动条 - 透明且不可见,直到可滚动 div 移动为止
我非常讨厌浏览器之间滚动条的不一致。最近看到 OSX lion 以其透明直到移动滚动条运行后,我想知道我们是否可以重新创建这个跨浏览器。
我查看了一些 JQuery 插件。最接近的是微小的滚动条,它很接近,在摆弄PNG图像之后,几乎足够接近,但它是有限的,因为我无法弄清楚如何仅在div滚动时显示它,然后再次轻轻地淡出它。另外,如果可能的话,我会享受一点动力,甚至弹性。
有办法做到这一点吗?
I utterly hate the inconsistency of scrollbars across browsers. After recently seeing OSX lion in action with its transparent until movement scrollbars I wonder if we can recreate this cross browser.
I looked at a few JQuery plugins. The closest was called tiny scrollbars which was close and after fiddling with the PNG images, nearly close enough, but it was limited in that I could not work out how to show it only while the div is being scrolled and then gently fade it out again. Also if possible I would enjoy a bit of momentum and even elasticity.
Is there a way of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以相应地设置溢出和切换
类似这样的事情可能会起作用:
从您的CSS
主体中开始{
溢出:隐藏;
然后
请注意,
您可能必须指定宽度和高度,以避免页面呈现时无意的剪切。
You can set overflow and toggle accordingly
Something like this might work:
Start with this in your css
body {
overflow: hidden;
}
Then
Note you might have to specify width and heights to avoid inadvertent clipping when the page renders.