问题
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?
回答1:
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/
回答2:
You can style scrollbars using jQuery.
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:
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.
来源:https://stackoverflow.com/questions/7645316/change-style-scrollbar-div-for-my-site