octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

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>


            
          
!

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;
}



            
          
!

JS

            
              
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console