如何使用html和css自定义滚动条 [英] how to customize scroll bars with html and css
本文介绍了如何使用html和css自定义滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将默认滚动条样式更改为自定义滚动条,
how to change default scroll bar style to customized scroll bars,
是否可以在没有Java脚本和j查询的情况下处理html和css
is this possible to do with html and css without java script and j query
预先感谢
推荐答案
您可以更改颜色,但目前仅在Webkit浏览器上可用.
You can change color, but currently it's work only on webkit browsers.
::-webkit-scrollbar {
width: 12px;
}
/* Track */
::-webkit-scrollbar-track {
/*-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.8);*/
-webkit-border-radius: 10px;
background-color:#fff;
border-radius: 10px;
}
/* Handle */
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
background:#666;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
这篇关于如何使用html和css自定义滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文