customize scroll bar using css [duplicate]

霸气de小男生 提交于 2019-12-25 07:27:16

问题


I have done the following to customize my scroll bar

::-webkit-scrollbar {
width: 4px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
border-radius: 10px;
}

::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

the problem is that this works only on chrome and safari. Any idea how to modify it in order to work for IE, opera and Mozila?


回答1:


I think the prefix -webkit- consider only scroll bars on safari and chrome. you should add -moz-, -o- and -ms- to complete the code. Hope i helped.



来源:https://stackoverflow.com/questions/16760830/customize-scroll-bar-using-css

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!