Apply webkit scrollbar style to an element - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Scrollbar

Description

Apply webkit scrollbar style to an element

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!--from w w w . j  av  a2s  .  com-->
   min-height:1001px
}

div#container {
   height:201px;
   width:301px;
   overflow:scroll;
}

div#content {
   height:1001px;
}

div::-webkit-scrollbar {
   width:13px;
}

div::-webkit-scrollbar-track {
   -webkit-box-shadow:inset 0 0 7px Chartreuse;
   border-radius:11px;
}

div::-webkit-scrollbar-thumb {
   border-radius:11px;
   -webkit-box-shadow:inset 0 0 7px yellow;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="content"></div> 
  </div>  
 </body>
</html>

Related Tutorials