Can anyone give a thorough explanation of how to make custom scroll bars? Are custom scroll bars compatible with all browsers?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You need to use pure javaScript to become compatible with all browsers.
This is one of the best solution for that
http://www.script-tutorials.com/custom-scrollbars-cross-browser-solution/
回答2:
These were one search away, and they're really good:
http://codemug.com/html/custom-scrollbars-using-css/
http://www.hongkiat.com/blog/css-scroll-bar/
http://www.codeproject.com/Tips/674478/Customize-Scrollbars-using-CSS3
回答3:
::-webkit-scrollbar-track {
background-color: #eaeaea;
border-left: 1px solid #ccc;
}
Simply add the above.