cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              <section id="parent">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto nemo, nesciunt rem earum facilis. Vitae dolore quidem neque dolor. Praesentium doloremque error animi obcaecati voluptatem aliquam eaque, labore eligendi consectetur.</p>
<button type="button">Append modal</button>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eum rem nulla impedit molestias tenetur natus eveniet et sed voluptatum nisi quam sint ratione ea perspiciatis, dicta quasi dolorem numquam aliquam.</p>
<p><a href="#">Link in Next node</a></p>

              body {
  margin: 20%;

div {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  background-color: rgba(0,0,0,.5);

div a {
  color: #fff;
              const button = document.querySelector('button');
const modal  = document.createElement('div');
const parent = document.getElementById('parent');

modal.innerHTML = '<p><a href="#">Link in Modal</a></p>';

button.addEventListener('click', () => {
Loading ..................