/ Published in: SASS
Styling scroll bar
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
.html: <div id="wrapper"> <div class="scrollbar" id="style-1"> </div> </div> .scss: .scrollbar { margin-left: 30px; float: left; height: 300px; width: 65px; background: #F5F5F5; overflow-y: scroll; margin-bottom: 25px; } .force-overflow { min-height: 450px; } #wrapper { text-align: center; width: 500px; margin: auto; } #style-1::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); border-radius: 3px; background-color: #F5F5F5; } #style-1::-webkit-scrollbar { width: 12px; background-color: #F5F5F5; } #style-1::-webkit-scrollbar-thumb { border-radius: 10px; -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); background-color: #555; }