CodePen

HTML

            
              


<div class="scroll s3" style="height: 600px; width: 200px;">
  <div style="width: 400px; background: transparent;">
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc nibh lacus, adipiscing eu volutpat a, rhoncus nec odio. Nullam libero massa, sodales vitae dapibus vitae, tempor hendrerit odio. Aliquam erat volutpat. Sed ornare rhoncus felis a dignissim. Ut pharetra ligula in libero mollis adipiscing consequat nec turpis. Nunc imperdiet neque nec tortor lobortis accumsan. Aliquam erat volutpat. Nam elit diam, tempus sed rutrum quis, tristique eget velit. Maecenas non arcu magna. Donec consequat metus id orci tincidunt accumsan. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla accumsan sodales diam, in iaculis magna vestibulum eget. Cras eget leo velit, sit amet feugiat sapien. Praesent vitae mollis lorem. Vivamus sit amet velit in tortor mollis lobortis. Nullam ullamcorper sem id urna iaculis viverra in eu metus.

  Proin mauris mauris, scelerisque sed consectetur in, bibendum id nisi. Sed quis erat leo, quis molestie ante. Pellentesque laoreet mattis sapien, a venenatis erat semper vel. Sed ullamcorper dignissim iaculis. Curabitur turpis leo, adipiscing eu dapibus non, pulvinar ac diam. Nullam pellentesque porttitor ipsum, et convallis sapien mollis sed. Sed semper sodales erat id porttitor. Curabitur lacus felis, eleifend eget porta et, hendrerit quis justo. Donec felis odio, lacinia et porta at, posuere et sem.</p>
  </div>
</div>


            
          
!
via HTML Inspector

CSS

            
              *{
  margin:0;
  padding:0;
}


::-webkit-scrollbar {
  width: 6px;
}
 
::-webkit-scrollbar-track {
  background: rgba(0,0,0,.1); 
}
 
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2); 
}

.scroll {
  float:left;
  overflow: auto;
  width: 400px;
  height: 200px;
  margin: 20px;
  padding: 10px;
}


.scroll.s3 {
  background:
    linear-gradient(rgba(255,255,255,0), white 90%) 0 100%,
    linear-gradient(rgba(255,255,255,0), white 10%) 0 100%,
    -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0,0,0,0)), to(rgba(0,0,0,.3))) 0 100%,
    -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0,0,0,.3)), to( rgba(0,0,0,0)));

  background-repeat: no-repeat;
  background-color: white;
 background-size: 10px 100%, 10px 100%, 5px 100%, 5px 100%;
  background-attachment: local, local, scroll, scroll;
}



            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................