自定义滚动条CSS样式
生活随笔
收集整理的這篇文章主要介紹了
自定义滚动条CSS样式
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
首先,給個(gè)默認(rèn)css,清除掉以前的樣式,給默認(rèn)背景
.scrollbar {margin-left: 30px;float: left;height: 300px;width: 65px;background: #F5F5F5;overflow-y: scroll;margin-bottom: 25px; }然后給自定義寬度和顏色
.scrollbar::-webkit-scrollbar {width: 12px;background-color: #F5F5F5; } .scrollbar::-webkit-scrollbar-thumb {border-radius: 10px;-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);background-color: #D62929; }預(yù)覽圖就是這個(gè)效果
?
轉(zhuǎn)載于:https://www.cnblogs.com/xiaoquangege/p/6132393.html
總結(jié)
以上是生活随笔為你收集整理的自定义滚动条CSS样式的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Linux 学习_ssh(secure
- 下一篇: 纯CSS实现气泡聊天框的方法