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

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

              
                <div class="section">
<div class="text-box">
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec interdum lectus ac risus scelerisque, quis mollis tellus laoreet. Quisque sem tellus, luctus in viverra at, scelerisque sit amet mi. Nulla facilisi. <a href="#">Quisque in tristique turpis</a>. Quisque ultrices dui a maximus dictum. Donec egestas aliquet urna nec congue. Sed laoreet mi ac pretium malesuada. Integer turpis nisi, sodales eget efficitur vitae, pulvinar in dolor. Nunc vitae ornare eros. Curabitur mi ex, lacinia non magna a, ultrices venenatis lorem. <a href="#">Proin vulputate odio ultricies quam egestas rhoncus</a>.
  </p>
  <p>Aliquam vel diam eros. <a href="#">Donec tincidunt augue sit amet sagittis tincidunt</a>. Aliquam sodales ante ipsum, non tristique est egestas vel. Etiam tempor turpis et nulla pulvinar, id feugiat erat vulputate. Nulla tempor dui diam. <a href="#">Suspendisse mollis</a>, ligula bibendum convallis pellentesque, odio purus commodo eros, eu venenatis sapien tellus nec odio. In urna est, tempor a egestas id, blandit sed libero. <a href="#">Maecenas placerat</a> non eros scelerisque viverra. Pellentesque vel tellus rhoncus, commodo libero a, rutrum nulla. Pellentesque sodales mollis consectetur.
</p>
</div>
<div class="modal-box">
  <h2>MODAL BOX</h2>
</div>
  </div>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.section {
  position: relative;
  font-family: sans-serif;
}
.text-box {
  padding: 20px;
  font-size: 20px;
}
.text-box p:not(:last-child) {
  margin-bottom: 1em;
}
.modal-box {
  position: absolute;
  left: 60px;
  top: 60px;
  right: 60px;
  bottom: 60px;
  background-color: rgba(0,0,0,0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
              
            
!

JS

              
                
              
            
!
999px

Console