Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="scroll-demo">
  <p>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ullamcorper diam ac nisl porttitor, non porttitor sapien vehicula. Cras vel scelerisque arcu. Cras nec sodales sem. Aenean viverra semper augue, eu pellentesque lacus laoreet et. In porttitor quam et turpis facilisis aliquet. Morbi in urna vel tortor finibus maximus in ut augue. Sed posuere semper condimentum. Quisque lacinia ut sem eget egestas. Donec risus est, porttitor vitae mauris quis, pretium tincidunt ex. Suspendisse est libero, fringilla in aliquet ut, faucibus quis nibh. Sed eget ex eu orci ullamcorper molestie. Aenean pharetra quis neque non imperdiet. Mauris euismod mattis sapien, id gravida nunc pulvinar ut. Vestibulum diam augue, egestas ut odio ut, placerat molestie metus.
  </p>
  <p>
Sed ut neque non urna aliquam luctus. Suspendisse bibendum, mauris ut dictum eleifend, enim arcu molestie sapien, vitae fringilla diam urna non diam. Maecenas pellentesque bibendum neque eu posuere. Morbi feugiat tristique tellus, viverra molestie nibh dignissim non. Nulla facilisi. Vestibulum non maximus turpis. Maecenas dapibus imperdiet quam, ut tincidunt nisl porttitor eu. In placerat tellus a tellus scelerisque, id facilisis est vulputate. Nam pulvinar massa enim, eu feugiat arcu vehicula nec. Suspendisse et arcu tincidunt, commodo felis vel, consectetur risus. In non ipsum dignissim, cursus ante et, pellentesque felis. Curabitur ultricies lacus nec dapibus vestibulum. Fusce nisl est, dapibus nec felis a, condimentum aliquam neque. Phasellus et iaculis metus. Vivamus nisl nibh, euismod a felis at, ultricies sagittis eros.
  </p>
</div>  


              
            
!

CSS

              
                .scroll-demo {
  width: 300px;
  height: 200px;
  overflow: auto;
  padding: 5px;
  border: 1px solid #ebebeb;
  /* for Firefox */
  scrollbar-color: #ffd55a #143d59;
  scrollbar-width: auto;
  
  /* Smooth scroll */
   scroll-behavior: smooth;
}

.scroll-demo::-webkit-scrollbar {
  width: 10px;
}

.scroll-demo::-webkit-scrollbar-track {
  box-shadow: inset 0 0 10px #143d59;
  border-radius: 50px;
}


.scroll-demo::-webkit-scrollbar-thumb {
  background: #ffd55a;
  border-radius: 50px;
}


.scroll-demo::-webkit-scrollbar-thumb:hover {
  background: #64dd17;
}


.scroll-demo::-webkit-scrollbar-button {
  background: black;
  border-radius: 10px;
}

              
            
!

JS

              
                
              
            
!
999px

Console