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

Auto Save

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

              
                
              
            
!

CSS

              
                :root {
  --sizeVar: 6vmin;
  --deviceColor: #333333;
  --deviceShadow: #000000;
  --deviceOn: linear-gradient(
    45deg,
    rgba(110, 36, 110, 1) 30%,
    rgba(193, 48, 57, 1) 40%,
    rgba(89, 18, 27, 1) 90%
  );
  --notifColor: rgba(128, 128, 128, 0.7);
  --notifShadow: rgba(128, 128, 128, 0.1);
  --notifText: #333333;
  --notifTitle: #545454;
}
html {
  background: #ffffff;
}
body {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: calc(var(--sizeVar) / -2);
  margin-top: calc(var(--sizeVar) / -2);
  width: var(--sizeVar);
  height: calc(var(--sizeVar) * 2);
  background: var(--deviceShadow);
  border: solid var(--deviceColor);
  border-width: calc(var(--sizeVar) / 3) calc(var(--sizeVar) / 6);
  border-radius: 1vmin;
  transform: rotate3d(1, 1, 1, -45deg);
  box-shadow: -1vmin 1vmin var(--deviceShadow),
    -0.9vmin 0.9vmin var(--deviceShadow), -0.8vmin 0.8vmin var(--deviceShadow),
    -0.7vmin 0.7vmin var(--deviceShadow), -0.6vmin 0.6vmin var(--deviceShadow),
    -0.5vmin 0.5vmin var(--deviceShadow), -0.4vmin 0.4vmin var(--deviceShadow),
    -0.3vmin 0.3vmin var(--deviceShadow), -0.2vmin 0.2vmin var(--deviceShadow),
    -0.1vmin 0.1vmin var(--deviceShadow);
  animation: ringDevice 3000ms linear infinite;
}
body::before,
body::after {
  content: "Kever Rahel\A Hello from the Holy Land,\A please keep in mind to...";
  font-size: calc(var(--sizeVar) / 2.5);
  font-family: sans-serif;
  color: var(--notifText);
  position: absolute;
  width: 492%;
  height: fit-content;
  padding: 24%;
  left: 7%;
  top: 150%;
  opacity: 0;
  margin-top: -210%;
  margin-left: 40%;
  white-space: pre;
  border-radius: calc(var(--sizeVar) / 4);
  background-color: var(--notifColor);
  animation: notifAnim 3000ms linear infinite;
}
body::before {
  transform-origin: top left;
  top: -150%;
  margin: 0;
  transform: scale(0.16);
}
body::after {
  box-shadow: -6vmin 6vmin 0 -3vmin var(--notifShadow),
    -5vmin 5vmin 0 -2.5vmin var(--notifShadow),
    -4vmin 4vmin 0 -2vmin var(--notifShadow),
    -3vmin 3vmin 0 -1.5vmin var(--notifShadow),
    -2vmin 2vmin 0 -1vmin var(--notifShadow),
    -1vmin 1vmin 0 -0.5vmin var(--notifShadow);
}
body::first-line {
  font-size: calc(var(--sizeVar) / 2.5);
  font-family: sans-serif;
  color: var(--notifTitle);
  font-weight: bold;
}

@keyframes ringDevice {
  12% {
    transform: rotate3d(1, 1, 1, -45deg);
    background: var(--deviceShadow);
  }
  14% {
    transform: rotate3d(1, 1, 1, -58deg);
    background: var(--deviceOn);
  }
  16% {
    transform: rotate3d(1, 1, 1, -35deg);
    background: var(--deviceOn);
  }
  18% {
    transform: rotate3d(1, 1, 1, -50deg);
    background: var(--deviceOn);
  }
  20% {
    transform: rotate3d(1, 1, 1, -45deg);
    background: var(--deviceOn);
  }
  90% {
    transform: rotate3d(1, 1, 1, -45deg);
    background: var(--deviceOn);
  }
  100% {
    transform: rotate3d(1, 1, 1, -45deg);
    background: var(--deviceShadow);
  }
}
@keyframes notifAnim {
  12% {
    top: 25%;
    opacity: 0;
  }
  16% {
    top: 5%;
    opacity: 1;
  }
  90% {
    top: 5%;
    opacity: 1;
  }
  100% {
    top: 5%;
    opacity: 0;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console