Pen Settings

HTML

CSS

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.

+ 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

              
                <a class="screen" href="https://codepen.io/tv/DxEZrp" target="_blank"></a>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
}

.screen:after {
  animation: flicker 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  opacity: 0.8;
  z-index: 2;
}

.screen:before {
  animation: skew 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  opacity: 0.8;
  z-index: 3;
}

.screen:after,
.screen:before {
  content: "";
  display: block;
  height: 100%;
  position: absolute;
  width: 100%;
}

.screen,
.screen:after,
.screen:before {
  background-image: linear-gradient(90deg, #073e59 0, #073e59 17%, #ffffff 17%, #ffffff 34%, #3c017d 34%, #3c017d 51%, #131313 51%, #131313 70%, #000000 70%, #000000 75%, #131313 75%, #131313 79%, #262626 79%, #262626 84%, #131313 84%, #131313 100%), linear-gradient(90deg, #0000ff 0, #0000ff 14%, #131313 14%, #131313 28%, #ff00fe 28%, #ff00fe 42%, #131313 42%, #131313 56%, #01ffff 56%, #01ffff 70%, #131313 70%, #131313 84%, #cccccc 84%, #cccccc 100%), linear-gradient(90deg, #cccccc 0, #cccccc 14%, #ffff00 14%, #ffff00 28%, #01ffff 28%, #01ffff 42%, #00ff01 42%, #00ff01 56%, #ff00fe 56%, #ff00fe 70%, #fe0000 70%, #fe0000 84%, #0000ff 84%, #0000ff 100%);
  background-position: 50% 43px, 50% 34px, 50% 0;
  background-repeat: repeat-x;
  background-size: 100px 50px;
}

.screen {
  border: 1px solid black;
  height: 50px;
  left: 50%;
  opacity: 1;
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  z-index: 1;
}

@keyframes flicker {
  0% {
    filter: hue-rotate(0deg);
    opacity: 0;
    transform: translateX(0);
  }
  89% {
    opacity: 0;
    transform: translateX(0);
  }
  90% {
    opacity: 0.9;
    transform: translateX(2px);
  }
  91% {
    transform: translateX(0);
  }
  92% {
    filter: hue-rotate(0deg);
    transform: translateX(-1px);
  }
  93% {
    filter: hue-rotate(30deg);
    transform: translateX(-2px);
  }
  95% {
    filter: blur(1px);
    transform: translateX(6px);
  }
  97% {
    filter: hue-rotate(5deg);
    transform: translateX(-1px);
  }
  98% {
    filter: blur(0px);
    filter: hue-rotate(0deg);
    transform: translateX(2px);
  }
  99% {
    opacity: 0.9;
    transform: translateX(-3px);
  }
  100% {
    filter: hue-rotate(0deg);
    opacity: 0;
    transform: translateX(0);
  }
}
@keyframes skew {
  0% {
    opacity: 0.7;
    transform: skew(0deg, 0deg);
  }
  10% {
    transform: skew(0deg, 0deg);
  }
  12% {
    filter: hue-rotate(0deg);
    transform: skew(-15deg, 0deg);
  }
  14% {
    filter: hue-rotate(-10deg);
    opacity: 0.5;
    transform: skew(15deg, 0deg);
  }
  16% {
    filter: hue-rotate(25deg);
    opacity: 0.7;
    transform: skew(0deg, 0deg);
  }
  17% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    transform: skew(0deg, 0deg);
  }
}

              
            
!

JS

              
                // Pure CSS Implementation
              
            
!
999px

Console