I want to have a custom scroll bar in Chrome.So, I'm using this sass:::-webkit-scrollbar { width: 0.5em; height: 0.5em;}::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.1); border-radius: 3px; &:hover { background: rgba(255,255,255,.2); }}My problem is that I want this scrollbar style only in an specific div. But if I do:#boardslist { ::-webkit-scrollbar { width: 0.5em; height: 0.5em; } ::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.1); border-radius: 3px; &:hover { background: rgba(255,255,255,.2); } }}is not working. Any ideas? 解决方案 #boardslist { &::-webkit-scrollbar { width: 0.5em; height: 0.5em; } &::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.1); border-radius: 3px; &:hover { background: rgba(255,255,255,.2); } }}Check this out http://codepen.io/tholman/pen/tldwm 这篇关于自定义滚动条仅在一格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 08:57