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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

              <div id="page-wrap">
  <h1>A receding background dialog box.</h1>
  <button>Open Dialog Box</button>

<div id="dialog">
  <h2>I'm a dialog box. You  have to click a button to open me.</h2>
  <button>Close Dialog Box</button>
              @import "compass/css3";

* {
  @include box-sizing(border-box);

html {
  background: #333;

html, body, #page-wrap {
  padding: 0;
  margin: 0;
  height: 100%;
  overflow: hidden;

body {
  text-align: center;
  font: 16px Sans-Serif;

  // Hack for performance, sometimes
  // -webkit-transform: translateZ(0);

h1 {
  margin: 0 0 50px 0;
  font: bold 40px Sans-Serif;

#page-wrap {
  padding: 50px;
  background: #F06D06;
  box-shadow: 0 0 100px black;

  @include transition(all 0.4s ease);
  @include filter(

  .dialogIsOpen & {
    @include filter(
    @include transform(scale(0.9));

#dialog {
  @include transition(all 0.4s ease);
  border-radius: 15px;
  pointer-events: none;
  position: fixed;
  width: 50%;
  padding: 60px;
  background: white;
  box-shadow: 0 0 25px black;
  top: 50%;
  left: 50%;
  margin: -25% 0 0 -25%;
  opacity: 0;
  @include transform(scale(1.5));
  .dialogIsOpen & {
    pointer-events: auto;
    opacity: 1;
    @include transform(scale(1));
  h2 {
    font-size: 24px;
              $("button").on("click", function() {

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................