.oLi-lists-scroll::-webkit-scrollbar { width:5px; padding:1px; background:url(../images/repeat-bar.png) repeat-y;}
/* Track */
.oLi-lists-scroll::-webkit-scrollbar-track {height:4px;}
/* Handle */
.oLi-lists-scroll::-webkit-scrollbar-thumb { background:url(../images/repeat-bar01.png) repeat-y; border-radius:2px; width:4px; border-left:1px solid #bfc8d2}
在设置overflow-y:auto的情况下,实现当内容多的时候加上滚动条,内容少的时候,去掉滚动条:
<div class="a b">内容</div>
.a{ overflow:hidden}
.a.b{overflow-y:auto};