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.

              <button id="show" class="btn"  title="Show dialog">Show dialog</button>
  <dialog class="dialog dialog-default">
    <button  id="close" class="btn btn-close" title="Close dialog">X</button>
    <h2>Never miss our newsletters!</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sollicitudin, justo eu consequat rutrum, leo tellus euismod quam, et consectetur nibh nunc vitae risus. Vestibulum auctor nunc dolor, et hendrerit elit aliquet at.</p>
    <form method="dialog">

      <input class="input" placeholder="Enter Email (not really)" />

      <button type="submit">Confirm</button>
              .btn {
  cursor: pointer;
.input {
  width: 100%;
  font-size: 1.6rem;
  padding: 0.4rem 0.8rem;
  margin: 0.8rem 0;

.dialog-default::backdrop { /* native */
  background: hsla(0,0%,6%,.97);
.dialog-default + .backdrop { /* polyfill */
  background: hsla(0,0%,6%,.97);

.dialog-default {
  max-width: 400px;
  margin: 0 auto;
  padding: 6rem 4rem;
  border-radius: .4rem;
  background: #222729;
  background-image: radial-gradient(circle at 50% 0,#2e3437,#1d2223);
  box-shadow: 0 0 .1rem rgba(0,0,0,.3);
  color: white;
  text-align: center;
  border: 0;
  position: relative;

.dialog-default .btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: transparent;
  color: white;
  font-size: 1.8rem;
  outline: 0;
               const dialog = document.querySelector( "dialog" ),
          showBtn = document.querySelector( "#show" ),
          closeBtn = document.querySelector( "#close" );

    showBtn.addEventListener( "click", e => dialog.showModal(), false );
    closeBtn.addEventListener( "click", e => dialog.close(), false );
Loading ..................