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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="quantum">
    <div class="wing wing--tl">
        <div class="scaler"></div>
    </div>
    <div class="wing wing--bl">
        <div class="scaler"></div>
    </div>
    <div class="halfm halfm--left"></div>
    <div class="halfm halfm--right"></div>
</div>
            
          
!
            
              $black: black;
$duration: 2000ms;
$yellow: #e2a610;

body {
    background-color: $black;
    min-height: 100vh;
    position: relative;
}

.quantum {
    animation: quantum-spin $duration linear infinite;
    bottom: calc(50% - 34px);
    height: 68.0964px;
    left: calc(50% - 31px);
    position: absolute;
    width: 63.1033px;
    z-index: 2;
    .wing {
        height: 18px;
        position: absolute;
        width: 78px;
        &--tl {
            left: -7.4px;
            top: 25px;
            transform: rotate(36deg) skew(36deg);
            .scaler {
                animation: top-left-wing $duration linear infinite;
            }
        }
        &--bl {
            left: -7.4px;
            top: 25px;
            transform: rotate(-36deg) skew(-36deg);
            .scaler {
                animation: bottom-left-wing $duration linear infinite;
            }
        }
        .scaler {
            background-color: $yellow;
            height: 100%;
            outline: 1px solid transparent;
        }
    }
    .halfm {
        animation: halfm $duration linear infinite;
        position: absolute;
        &--left, &--right {
            border-style: solid;
            height: 0;
            top: 37.9px;
            width: 0;
        }
        &--left {
            border-width: 7.45px 0 7.6px 10.3px;
            border-color: transparent transparent transparent $black;
            left: 22.5px;
        }
        &--right {
            border-width: 7.45px 10.3px 7.6px 0;
            border-color: transparent $black transparent transparent;
            left: 30.8px;
        }
    }
}

@keyframes halfm {
    0% {
        transform: scaleY(0);
        transform-origin: 0 100%;
    }

    20% {
        transform: scaleY(0);
        transform-origin: 0 100%;
    }

    31.667% {
        transform: scaleY(1);
        transform-origin: 0 100%;
    }

    55% {
        transform: scaleY(1);
        transform-origin: 0 100%;
    }

    58.333% {
        transform: scaleY(0);
        transform-origin: 0 100%;
    }

    100% {
        transform: scaleY(0);
        transform-origin: 0 100%;
    }
}

@keyframes quantum-spin {
    0% {
        transform: rotate(0);
    }

    53.333% {
        transform: rotate(0);
    }

    56.667% {
        transform: rotate(10deg);
    }

    63.333% {
        transform: rotate(190deg);
    }
  
    71.667% {
        transform: rotate(340deg);
    }

    78.333% {
        transform: rotate(350deg);
    }

    100% {
        transform: rotate(360deg);
    }

}

@keyframes bottom-left-wing {

    0% {
        transform: scaleX(0);
        transform-origin: 0;
    }

    6.667% {
        transform: scaleX(0.75);
        transform-origin: 0;
    }
    
    11.667% {
        transform: scaleX(0.95);
        transform-origin: 0;
    }

    13.333% {
        transform: scaleX(0.985);
        transform-origin: 0;
    }

    15% {
        transform: scaleX(1);
        transform-origin: 0;
    }

    50% {
        transform: scaleX(1);
        transform-origin: 100%;
    }

    // Prevent Safari & Edge from freaking out
    50.001% {
        transform: scaleX(0.99);
        transform-origin: 100%;
    }   

    56.667% {
        transform: scaleX(0.1);
        transform-origin: 100%;
    }

    60% {
        transform: scaleX(0);
        transform-origin: 100%;
    }
    // Prevent Safari & Edge from freaking out
    60.001% {
        transform-origin: 0;
    }

    100% {
        transform: scaleX(0);
        transform-origin: 0;
    }
}

@keyframes top-left-wing {
    0% {
        opacity: 1;
        transform: scaleX(0) scaleY(1);
        // transform: scale(0, 1);  // Edge and Safari do not like this
        transform-origin: 0;
    }

    15% {
        transform: scaleX(0) scaleY(1);
        transform-origin: 0;
    }

    21.667% {
        transform: scaleX(0.75) scaleY(1);
        transform-origin: 0;
    }

    26.667% {
        transform: scaleX(0.95) scaleY(1);
        transform-origin: 0;
    }

    28.333% {
        transform: scaleX(0.985) scaleY(1);
        transform-origin: 0;
    }

    30% {
        transform: scaleX(1) scaleY(1);
        transform-origin: 0;
    }

    
    51.667% {
        transform: scaleX(1) scaleY(1);
        transform-origin: 0;
    }
    
    63.333% {
        transform: scaleX(1) scaleY(0.3);
        transform-origin: 0;
    }

    76.667% {
        opacity: 1;
    }

    85% {
        transform: scaleX(1) scaleY(0.05);
        transform-origin: 0;
    }

    95% {
        transform: scaleX(1) scaleY(0);
        transform-origin: 0;
    }

    // Stops flickering on restart in Safari/Edge
    99.999% {
        opacity: 0;
    }

    100% {
        opacity: 0;
        transform: scaleX(1) scaleY(0);
        transform-origin: 0;
    }
}
            
          
!
999px

Console