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

              
                <!-- Perspective example - by Donovan Hutchinson (@donovanh) for use in Adobe Inspire Magazine -->
<html>
  <head>
    <title>Perspective Example</title>
    <link href="css/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div class="stage">
      <div class="positioning">
        <div class="monitor">
          <figure class="base-front"></figure>
          <figure class="base-left"></figure>
          <figure class="base-right"></figure>
          <figure class="base-back"></figure>
          <div class="head">
            <figure class="back"></figure>
            <figure class="left"></figure>
            <figure class="right"></figure>
            <figure class="top"></figure>
            <figure class="front">
              <span class="bezel-top"></span>
              <span class="bezel-left"></span>
              <span class="bezel-right"></span>
              <span class="bezel-bottom"></span>
              <figure class="screen-container">
                <span class="screen">
                  <p>Try changing the perspective value to see how the 3D effect changes</p>
                  <span class="sheen"></span>
                </span>
              </figure>
            </figure>
          </div>
          <figure class="shadow"></figure>
        </div>

        <!-- End positioning div -->
      </div>
    </div>
  </body>
</html>
              
            
!

CSS

              
                

/* Perspective example - by Donovan Hutchinson (@donovanh) for use in Adobe Inspire Magazine */
/* Change the perspectivr value here to see it change on the page */
/* Lower values (such as 500px) product a more extreme effect */
.stage {
  -webkit-perspective: 1600px;
  -moz-perspective: 1600px;
  -ms-perspective: 1600px;
  -o-perspective: 1600px;
  perspective: 1600px;
}




html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 100%;
  vertical-align: baseline;
}

html {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

caption, th, td {
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}

q, blockquote {
  quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
  content: "";
  content: none;
}

a img {
  border: none;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
  display: block;
}

body {
  background-color: #eee9e6;
  font-size: 34px;
}

.stage {
  width: 100%;
  height: 700px;
  position: relative;
  -webkit-perspective-origin: 50% 100px;
  -moz-perspective-origin: 50% 100px;
  -ms-perspective-origin: 50% 100px;
  -o-perspective-origin: 50% 100px;
  perspective-origin: 50% 100px;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #131c2d), color-stop(40%, #131c2d), color-stop(40%, #b1b5b8), color-stop(100%, #eee9e6));
  background: -webkit-linear-gradient(top, #131c2d, #131c2d 40%, #b1b5b8 40%, #eee9e6);
  background: -moz-linear-gradient(top, #131c2d, #131c2d 40%, #b1b5b8 40%, #eee9e6);
  background: -o-linear-gradient(top, #131c2d, #131c2d 40%, #b1b5b8 40%, #eee9e6);
  background: linear-gradient(top, #131c2d, #131c2d 40%, #b1b5b8 40%, #eee9e6);
}

.positioning {
  position: absolute;
  width: 9em;
  top: 3em;
  left: 50%;
  margin-left: -4.5em;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transform: rotateY(-40deg);
  -moz-transform: rotateY(-40deg);
  -ms-transform: rotateY(-40deg);
  -o-transform: rotateY(-40deg);
  transform: rotateY(-40deg);
}
.positioning.animated {
  -webkit-animation: back-and-forth 14s ease-in-out infinite;
  -moz-animation: back-and-forth 14s ease-in-out infinite;
  -o-animation: back-and-forth 14s ease-in-out infinite;
  -ms-animation: back-and-forth 14s ease-in-out infinite;
  animation: back-and-forth 14s ease-in-out infinite;
}

.monitor {
  width: 12em;
  height: 10em;
  margin: 0 auto;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.monitor figure, .monitor span {
  display: block;
  position: absolute;
  /* +backface-visibility(hidden) */
  opacity: 1;
}
.monitor .head {
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-transform: rotateX(5deg);
  -moz-transform: rotateX(5deg);
  -ms-transform: rotateX(5deg);
  -o-transform: rotateX(5deg);
  transform: rotateX(5deg);
}
.monitor .front {
  height: 8em;
  width: 10em;
  background: #e0e0e0;
  -webkit-transform: translateZ(4em);
  -moz-transform: translateZ(4em);
  -ms-transform: translateZ(4em);
  -o-transform: translateZ(4em);
  transform: translateZ(4em);
}
.monitor .front .bezel-top {
  border-top: 0.75em solid #f2f2f2;
  border-right: 0.5em solid transparent;
  border-left: 0.5em solid transparent;
  width: 9em;
}
.monitor .front .bezel-left {
  border-top: 0.5em solid #d9d9d9;
  border-right: 0.75em solid transparent;
  border-left: 0.75em solid transparent;
  width: 6.5em;
  -webkit-transform: rotateZ(-90deg) translateX(-3.75em) translateY(-3.75em);
  -moz-transform: rotateZ(-90deg) translateX(-3.75em) translateY(-3.75em);
  -ms-transform: rotateZ(-90deg) translateX(-3.75em) translateY(-3.75em);
  -o-transform: rotateZ(-90deg) translateX(-3.75em) translateY(-3.75em);
  transform: rotateZ(-90deg) translateX(-3.75em) translateY(-3.75em);
}
.monitor .front .bezel-right {
  border-top: 0.5em solid #d4d4d4;
  border-right: 0.75em solid transparent;
  border-left: 0.75em solid transparent;
  width: 6.5em;
  -webkit-transform: rotateZ(90deg) translateX(3.75em) translateY(-5.75em);
  -moz-transform: rotateZ(90deg) translateX(3.75em) translateY(-5.75em);
  -ms-transform: rotateZ(90deg) translateX(3.75em) translateY(-5.75em);
  -o-transform: rotateZ(90deg) translateX(3.75em) translateY(-5.75em);
  transform: rotateZ(90deg) translateX(3.75em) translateY(-5.75em);
}
.monitor .front .bezel-bottom {
  border-top: 0.75em solid #cccccc;
  border-right: 0.5em solid transparent;
  border-left: 0.5em solid transparent;
  width: 9em;
  -webkit-transform: rotateZ(180deg) translateY(-7.25em);
  -moz-transform: rotateZ(180deg) translateY(-7.25em);
  -ms-transform: rotateZ(180deg) translateY(-7.25em);
  -o-transform: rotateZ(180deg) translateY(-7.25em);
  transform: rotateZ(180deg) translateY(-7.25em);
}
.monitor .front .screen-container {
  width: 7em;
  height: 4.6em;
  background: #c2c2c2;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b3b3b3), color-stop(4%, #cccccc), color-stop(96%, #cccccc), color-stop(100%, #a6a6a6));
  background: -webkit-linear-gradient(top, #b3b3b3, #cccccc 4%, #cccccc 96%, #a6a6a6);
  background: -moz-linear-gradient(top, #b3b3b3, #cccccc 4%, #cccccc 96%, #a6a6a6);
  background: -o-linear-gradient(top, #b3b3b3, #cccccc 4%, #cccccc 96%, #a6a6a6);
  background: linear-gradient(top, #b3b3b3, #cccccc 4%, #cccccc 96%, #a6a6a6);
  border-radius: 0.1em;
  padding: 0.5em;
  -webkit-transform: translate3d(1em, 1.25em, 0);
  -moz-transform: translate3d(1em, 1.25em, 0);
  -ms-transform: translate3d(1em, 1.25em, 0);
  -o-transform: translate3d(1em, 1.25em, 0);
  transform: translate3d(1em, 1.25em, 0);
}
.monitor .front .screen-container .screen {
  display: block;
  position: absolute;
  left: 0.25em;
  top: 0.25em;
  background: #657374;
  border: 0.25em solid #657374;
  width: 7em;
  height: 4.6em;
  border-radius: 0.25em;
  overflow: hidden;
}
.monitor .front .screen-container .screen img {
  width: 100%;
  height: 100%;
  border-radius: 0.1em;
}
.monitor .front .screen-container .screen p {
  color: #00c317;
  font-family: monospace, prestige;
  font-size: 0.4em;
}
.monitor .front .screen-container .screen p:before {
  content: "> ";
}
.monitor .front .screen-container .screen p:after {
  content: " |";
  -webkit-animation: flash 1.5s infinite linear;
  -moz-animation: flash 1.5s infinite linear;
  -o-animation: flash 1.5s infinite linear;
  -ms-animation: flash 1.5s infinite linear;
  animation: flash 1.5s infinite linear;
}
.monitor .front .screen-container .sheen {
  display: block;
  position: absolute;
  top: 0;
  background: -webkit-gradient(linear, 100% 0%, 0% 100%, color-stop(0%, rgba(255, 255, 255, 0.03)), color-stop(50%, rgba(255, 255, 255, 0.06)), color-stop(50%, transparent), color-stop(100%, transparent));
  background: -webkit-linear-gradient(top right, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06) 50%, transparent 50%, transparent);
  background: -moz-linear-gradient(top right, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06) 50%, transparent 50%, transparent);
  background: -o-linear-gradient(top right, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06) 50%, transparent 50%, transparent);
  background: linear-gradient(top right, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06) 50%, transparent 50%, transparent);
  width: 100%;
  height: 100%;
}
.monitor .back {
  height: 8em;
  width: 10em;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f2f2f2), color-stop(0.25em, #e6e6e6), color-stop(100%, #c2c2c2));
  background: -webkit-linear-gradient(top, #f2f2f2, #e6e6e6 0.25em, #c2c2c2);
  background: -moz-linear-gradient(top, #f2f2f2, #e6e6e6 0.25em, #c2c2c2);
  background: -o-linear-gradient(top, #f2f2f2, #e6e6e6 0.25em, #c2c2c2);
  background: linear-gradient(top, #f2f2f2, #e6e6e6 0.25em, #c2c2c2);
  -webkit-transform: translateZ(-4em) rotateY(180deg);
  -moz-transform: translateZ(-4em) rotateY(180deg);
  -ms-transform: translateZ(-4em) rotateY(180deg);
  -o-transform: translateZ(-4em) rotateY(180deg);
  transform: translateZ(-4em) rotateY(180deg);
}
.monitor .top {
  height: 8em;
  width: 10em;
  background-color: #ebf0dc;
  background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #fafafa), color-stop(0.25em, #d9d9d9), color-stop(9.35em, #d9d9d9), color-stop(100%, #fafafa));
  background: -webkit-linear-gradient(left, #fafafa, #d9d9d9 0.25em, #d9d9d9 9.35em, #fafafa);
  background: -moz-linear-gradient(left, #fafafa, #d9d9d9 0.25em, #d9d9d9 9.35em, #fafafa);
  background: -o-linear-gradient(left, #fafafa, #d9d9d9 0.25em, #d9d9d9 9.35em, #fafafa);
  background: linear-gradient(left, #fafafa, #d9d9d9 0.25em, #d9d9d9 9.35em, #fafafa);
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f2f2f2), color-stop(0.25em, #d9d9d9), color-stop(100%, #b3b3b3));
  background: -webkit-linear-gradient(top, #f2f2f2, #d9d9d9 0.25em, #b3b3b3);
  background: -moz-linear-gradient(top, #f2f2f2, #d9d9d9 0.25em, #b3b3b3);
  background: -o-linear-gradient(top, #f2f2f2, #d9d9d9 0.25em, #b3b3b3);
  background: linear-gradient(top, #f2f2f2, #d9d9d9 0.25em, #b3b3b3);
  -webkit-transform: rotateX(90deg) translateZ(4em);
  -moz-transform: rotateX(90deg) translateZ(4em);
  -ms-transform: rotateX(90deg) translateZ(4em);
  -o-transform: rotateX(90deg) translateZ(4em);
  transform: rotateX(90deg) translateZ(4em);
}
.monitor .left {
  height: 8em;
  width: 8em;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(0.25em, #e0e0e0), color-stop(100%, #b3b3b3));
  background: -webkit-linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  background: -moz-linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  background: -o-linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  background: linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  -webkit-transform: rotateY(-90deg) translateZ(4em);
  -moz-transform: rotateY(-90deg) translateZ(4em);
  -ms-transform: rotateY(-90deg) translateZ(4em);
  -o-transform: rotateY(-90deg) translateZ(4em);
  transform: rotateY(-90deg) translateZ(4em);
}
.monitor .left:after {
  content: "";
  position: absolute;
  width: 7em;
  height: 1em;
  top: 0.5em;
  left: 0.5em;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(100, 100, 100, 0.8)), color-stop(30%, rgba(100, 100, 100, 0.8)), color-stop(30%, transparent), color-stop(100%, transparent));
  background: -webkit-linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background: -moz-linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background: -o-linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background: linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background-size: 2em;
}
.monitor .right {
  height: 8em;
  width: 8em;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(0.25em, #e0e0e0), color-stop(100%, #b3b3b3));
  background: -webkit-linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  background: -moz-linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  background: -o-linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  background: linear-gradient(top, #ffffff, #e0e0e0 0.25em, #b3b3b3);
  -webkit-transform: rotateY(90deg) translateZ(6em);
  -moz-transform: rotateY(90deg) translateZ(6em);
  -ms-transform: rotateY(90deg) translateZ(6em);
  -o-transform: rotateY(90deg) translateZ(6em);
  transform: rotateY(90deg) translateZ(6em);
}
.monitor .right:after {
  content: "";
  position: absolute;
  width: 7em;
  height: 1em;
  top: 0.5em;
  right: 0.5em;
  background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(100, 100, 100, 0.8)), color-stop(30%, rgba(100, 100, 100, 0.8)), color-stop(30%, transparent), color-stop(100%, transparent));
  background: -webkit-linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background: -moz-linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background: -o-linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background: linear-gradient(top, rgba(100, 100, 100, 0.8), rgba(100, 100, 100, 0.8) 30%, transparent 30%, transparent);
  background-size: 2em;
}
.monitor .base-front {
  height: 1.8em;
  width: 10em;
  background: #c2c2c2;
  -webkit-transform: translateY(8em) translateZ(3em);
  -moz-transform: translateY(8em) translateZ(3em);
  -ms-transform: translateY(8em) translateZ(3em);
  -o-transform: translateY(8em) translateZ(3em);
  transform: translateY(8em) translateZ(3em);
}
.monitor .base-front:after {
  content: "";
  display: block;
  width: 0.5em;
  height: 0.4em;
  position: absolute;
  top: 0.5em;
  right: 1em;
  background: red;
  border-top: 0.1em solid #b3b3b3;
  border-right: 0.2em solid #cccccc;
  border-bottom: 0.1em solid #e6e6e6;
  border-left: 0.2em solid #cccccc;
  border-radius: 0.12em;
}
.monitor .base-back {
  height: 1.8em;
  width: 10em;
  background: #b3b3b3;
  -webkit-transform: translateY(8em) translateZ(-3.38em) rotateY(180deg);
  -moz-transform: translateY(8em) translateZ(-3.38em) rotateY(180deg);
  -ms-transform: translateY(8em) translateZ(-3.38em) rotateY(180deg);
  -o-transform: translateY(8em) translateZ(-3.38em) rotateY(180deg);
  transform: translateY(8em) translateZ(-3.38em) rotateY(180deg);
}
.monitor .base-left {
  height: 1.8em;
  width: 6em;
  background: #b3b3b3;
  -webkit-transform: translateY(8em) rotateY(-90deg) translateZ(3em);
  -moz-transform: translateY(8em) rotateY(-90deg) translateZ(3em);
  -ms-transform: translateY(8em) rotateY(-90deg) translateZ(3em);
  -o-transform: translateY(8em) rotateY(-90deg) translateZ(3em);
  transform: translateY(8em) rotateY(-90deg) translateZ(3em);
}
.monitor .base-right {
  height: 1.8em;
  width: 6em;
  background: #b3b3b3;
  -webkit-transform: translateY(8em) rotateY(90deg) translateZ(7em);
  -moz-transform: translateY(8em) rotateY(90deg) translateZ(7em);
  -ms-transform: translateY(8em) rotateY(90deg) translateZ(7em);
  -o-transform: translateY(8em) rotateY(90deg) translateZ(7em);
  transform: translateY(8em) rotateY(90deg) translateZ(7em);
}
.monitor .shadow {
  width: 12em;
  height: 8em;
  background: transparent;
  -webkit-transform: rotateX(90deg) translateZ(-6em) translateX(21em);
  -moz-transform: rotateX(90deg) translateZ(-6em) translateX(21em);
  -ms-transform: rotateX(90deg) translateZ(-6em) translateX(21em);
  -o-transform: rotateX(90deg) translateZ(-6em) translateX(21em);
  transform: rotateX(90deg) translateZ(-6em) translateX(21em);
  -webkit-box-shadow: -22em 0 1.8em rgba(100, 90, 100, 0.2);
  -moz-box-shadow: -22em 0 1.8em rgba(100, 90, 100, 0.2);
  box-shadow: -22em 0 1.8em rgba(100, 90, 100, 0.2);
}

@-moz-keyframes back-and-forth {
  0% {
    -moz-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }

  40%, 50% {
    -moz-transform: rotateY(-40deg);
    transform: rotateY(-40deg);
  }

  90%, 100% {
    -moz-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }
}

@-webkit-keyframes back-and-forth {
  0% {
    -webkit-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }

  40%, 50% {
    -webkit-transform: rotateY(-40deg);
    transform: rotateY(-40deg);
  }

  90%, 100% {
    -webkit-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }
}

@-o-keyframes back-and-forth {
  0% {
    -o-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }

  40%, 50% {
    -o-transform: rotateY(-40deg);
    transform: rotateY(-40deg);
  }

  90%, 100% {
    -o-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }
}

@-ms-keyframes back-and-forth {
  0% {
    -ms-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }

  40%, 50% {
    -ms-transform: rotateY(-40deg);
    transform: rotateY(-40deg);
  }

  90%, 100% {
    -ms-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }
}

@keyframes back-and-forth {
  0% {
    -webkit-transform: rotateY(40deg);
    -moz-transform: rotateY(40deg);
    -ms-transform: rotateY(40deg);
    -o-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }

  40%, 50% {
    -webkit-transform: rotateY(-40deg);
    -moz-transform: rotateY(-40deg);
    -ms-transform: rotateY(-40deg);
    -o-transform: rotateY(-40deg);
    transform: rotateY(-40deg);
  }

  90%, 100% {
    -webkit-transform: rotateY(40deg);
    -moz-transform: rotateY(40deg);
    -ms-transform: rotateY(40deg);
    -o-transform: rotateY(40deg);
    transform: rotateY(40deg);
  }
}

@-moz-keyframes flash {
  0% {
    opacity: 0;
  }

  49.9% {
    opacity: 0;
  }

  50%, 100% {
    opacity: 1;
  }
}

@-webkit-keyframes flash {
  0% {
    opacity: 0;
  }

  49.9% {
    opacity: 0;
  }

  50%, 100% {
    opacity: 1;
  }
}

@-o-keyframes flash {
  0% {
    opacity: 0;
  }

  49.9% {
    opacity: 0;
  }

  50%, 100% {
    opacity: 1;
  }
}

@-ms-keyframes flash {
  0% {
    opacity: 0;
  }

  49.9% {
    opacity: 0;
  }

  50%, 100% {
    opacity: 1;
  }
}

@keyframes flash {
  0% {
    opacity: 0;
  }

  49.9% {
    opacity: 0;
  }

  50%, 100% {
    opacity: 1;
  }
}


              
            
!

JS

              
                
              
            
!
999px

Console