问题
I want to style my custom scrollbar. I know this is possible with WebKit, but is it possible to achieve a similar effect in Internet Explorer?
回答1:
Generally, yes it's possible, with only browserspecific CSS for IE:
BODY {
background-color : orange;
scrollbar-face-color : red;
scrollbar-arrow-color : green;
scrollbar-track-color : yellow;
scrollbar-shadow-color : pink;
scrollbar-highlight-color : white;
scrollbar-3dlight-color : brown;
scrollbar-darkshadow-Color: gray;
}
You can play around with it. More details
For more control there are several JS-Plugins to achieve the same look and feel for IE like in Webkit. I find it difficult to apply these, but here a list of Plugins i think, they're OK:
- jQuery custom content scroller
- dw_scroll
- jscrollpane
A list of similar plugins: http://slodive.com/web-development/jquery-scroll/
To get it work, it's important to set your HTML-Markup as exactly the same as in the examples.
What you can do is, open the example HTML and modify them to your needs. That's the easiest way, i think.
Hope this helps :)
来源:https://stackoverflow.com/questions/10954475/is-it-possible-to-achieve-the-webkit-scrollbar-effect-in-ie