如何在html网页中制作漂亮的滚动条
我见过一些网页在 div
元素溢出时有一个非常漂亮的滚动条。这不是默认滚动条,看起来像 iPhone 中的滚动条。一个很好的例子是 twitter,当你点击某人查看时更多信息。我不确定我是否清楚地表达了这一点...
我的页面中要显示一个 div,它可能会溢出,当它溢出时,我想要一个漂亮的滚动条,而不是默认的滚动条。有人知道如何实现这一点吗?或者有我可以使用一些开源项目吗? 多谢!
I have seen some web pages have a very nice scroll bar when a div
element overflows.It's not the default one and looks like scroll bars in iPhone.A good example is twitter's when you click on someone to see more information.I'm not sure I'm putting this clearly...
I have a div to display in my page and it's likely to overflow and when it does,I want a nice scroll bar with it,not the default one.Someone knows how to accomplish that?Or there's some open source project I can use?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如今,有数百种可用于自定义滚动条的选项。它们通常很简单,只需将类分配给 div,然后在加载时调用插件函数:
http:// jscrollpane.kelvinluck.com/
There are 100s of options available for custom scroll bars these days. They're usually as simple as assigning a class to a div, and then calling the plugin function on load:
http://jscrollpane.kelvinluck.com/