jQuery 更改我网站的样式滚动条 div
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7645316/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Change style scrollbar div for my site
提问by JellyBelly
I would like the style of the scrollbar of my div style was similar to the iPhone or the new finder osx Lion. It must be compatible with all browsers. Is it possible?
我希望我的 div 样式的滚动条样式类似于 iPhone 或新的 finder osx Lion。它必须与所有浏览器兼容。是否可以?
回答by Terry
There are actually ways to change the looks of the scrollbars in webkit browsers, with CSS only http://css-tricks.com/9130-custom-scrollbars-in-webkit/It is currently not possible to style scrollbars to have a uniform cross browser appearance, though. You will have to resort to jQuery to get this done http://www.net-kit.com/jquery-custom-scrollbar-plugins/
实际上有一些方法可以改变 webkit 浏览器中滚动条的外观,仅使用 CSS http://css-tricks.com/9130-custom-scrollbars-in-webkit/目前无法将滚动条设置为统一样式不过,跨浏览器外观。你将不得不求助于 jQuery 来完成这个http://www.net-kit.com/jquery-custom-scrollbar-plugins/
回答by GV1
You can style scrollbars using jQuery.
您可以使用 jQuery 设置滚动条的样式。
http://www.net-kit.com/jquery-custom-scrollbar-plugins/
http://www.net-kit.com/jquery-custom-scrollbar-plugins/
I think, #3 in that list is similar to the iPhone scrollbars. May require slight modification.
我认为,该列表中的 #3 类似于 iPhone 滚动条。可能需要稍作修改。
回答by Bas Slagter
Changing the scrollbars apprearance using CSS only is a feature that is only supported in IE as far as I know. There are however options involving some scripting (using jQuery plugins) that can do the trick.
据我所知,仅使用 CSS 更改滚动条外观是一项仅在 IE 中支持的功能。然而,有一些选项涉及一些脚本(使用jQuery 插件)可以做到这一点。