Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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

              
                <section>
    <div class="overflow-visible">
      <h2>Overflow visible</h2>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum vel repudiandae numquam distinctio eius cum eligendi sit nesciunt! Aliquid ut laboriosam quis laborum, sit optio suscipit enim possimus ad aut!
    </div>
    <div class="overflow-hidden">
      <h2>Overflow hidden</h2>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum vel repudiandae numquam distinctio eius cum eligendi sit nesciunt! Aliquid ut laboriosam quis laborum, sit optio suscipit enim possimus ad aut!
    </div>
    <div class="overflow-scroll">
      <h2>Overflow scroll</h2>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum vel repudiandae numquam distinctio eius cum eligendi sit nesciunt! Aliquid ut laboriosam quis laborum, sit optio suscipit enim possimus ad aut!
    </div>
    <div class="overflow-auto">
      <h2>Overflow auto</h2>
      <button id="btn-toggle">toggle scroll</button>
    </div>
    <div class="overflow-clip" id="overflow-clip" >
    <h2>Overflow clip</h2>
    Lorem ipsum dolor sit amet consectetur adipisicing elit. Eum vel repudiandae numquam distinctio eius cum eligendi sit nesciunt! Aliquid ut laboriosam quis laborum, sit optio suscipit enim possimus ad aut!
  </div>
</section>
              
            
!

CSS

              
                html {
  background: #FFF8DC;
  padding: 2rem;
}
button {
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  border: 0;
  display: block;
  margin: 0 auto;
}
section {
  display: flex;
  width: 100%;
  justify-content: space-evenly;
}
h2 {
  margin: 0;
}
div {
  width: 9rem;
  height: 9rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 3px dashed gray;
}
.overflow-visible {
  background-color: pink;
  overflow: visible;
}

.overflow-hidden {
  background-color: lightblue;
  overflow: hidden;
}
.overflow-scroll {
  background-color: lightgreen;
  overflow: scroll;
}

.overflow-auto {
  background-color: orange;
  overflow: auto;
}

.overflow-clip {
  border-radius: 0 !important;
  background-color: #cdb4db;
  overflow: clip;
  overflow-clip-margin: 2rem;
}
              
            
!

JS

              
                document.getElementById('btn-toggle').onclick = function(){
 const div =  document.getElementsByClassName('overflow-auto');
 div[0].innerHTML = 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Suscipit praesentium accusantium natus commodi dolor alias tempora ea nesciunt sapiente, laudantium amet, harum aut. Tempora beatae consectetur deserunt quis, corporis veniam.';
}
              
            
!
999px

Console