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

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 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.

HTML

              
                -40.times do
 .cell
#wrap
 .plane
  .body
   .wrap
    .front
     -8.times do
      .side
     .prop
    .rear
     -8.times do
      .side
     .wings
     .fins
 .inner
  -8.times do
   .cell
    -5.times do
     .side
              
            
!

CSS

              
                $g: #efefef;
$b: #eb5158;
$bl: #c4e4e4;
$gr: #a6cd52;
$t: transparent;
$g2: #555;

body{
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
  width:100vw;
  perspective:1200px;
  background:$bl;
  flex-wrap:wrap;
  *{
    transform-style:preserve-3d;
    &:before, &:after{
      transform-style:preserve-3d;
    }
  }
  .cell{
    position:absolute;
    height:2.5vh;
    width:100vw;
    z-index:999;
    cursor:pointer;
    &:focus, &:active{
      ~ #wrap .plane .body .wrap{
        transform:rotateZ(720deg);
      }
    }
    @for $i from 1 through 40{
        &:nth-of-type(#{$i}){
          top:#{($i - 1) * 2.5}vh;
          &:hover{
            & ~ #wrap{
              transform:rotateX(#{70 - $i}deg) translateY(#{250 - ($i * 5)}px) scale(0.75);
               transition:0.2s linear;
            }
          }
        }
      }
    }
  #wrap{
    pointer-events:none;
    display:grid;
    width:500px;
    height:500px;
    position:relative;
    transform:rotateX(65deg) translateY(250px) scale(0.75);
    transition:1s ease-in-out;
    .plane{
      width:0px;
      height:0px;
      position:absolute;
      z-index:999;
      top:-40px;
      left:-40px;
      transform:rotate(-270deg) translateZ(50px) rotateX(90deg);
      .body{
        position:absolute;
        transform:scale(0.35) scaleZ(0.5) rotateZ(-40deg);
        animation:flutter 1.5s ease-in-out infinite alternate;
        .wrap{
          position:absolute;
          transition:2s ease-in-out;
        }
        @keyframes flutter{
          to{
            transform:scale(0.35) scaleZ(0.5) rotateZ(40deg);
          }
        }
      }
      .front{
        .side{
          &:after{
            content:'';
            position:absolute;
            width:100%;
            height:100%;
            background:$b;
            transform-origin:50% 120%;
            transform:rotate(180deg) translateZ(20px) rotateX(105deg) scale(0.9);
          }
        }
      }
      .prop{
        width:20px;
        height:20px;
        background:lighten($b, 20%);
        box-shadow:inset 0 0 0 3px darken($g, 10%);
        position:absolute;
        border-radius:100%;
        top:20px;
        transform:translateZ(20px) rotate(0deg);
        left:-5px;
        animation:prop 0.25s linear infinite;
        @keyframes prop{
          to{
            transform:translateZ(20px) rotate(360deg);
          }
        }
        &:before, &:after{
          content:'';
          position:absolute;
          width:7.5px;
          height:30px;
          background:lighten($g, 20%);
          box-shadow:0 0 0 2px darken($g, 30%);
          left:calc(50% - 3.25px);
          bottom:calc(50% + 2.5px);
          border-radius:10px 10px 0 0;
        }
        &:after{
          bottom:auto;
          top:calc(50% + 2.5px);
          border-radius:0 0 10px 10px;
        }
      }
      .fins{
        height:30px;
        width:10px;
        background:#fff;
        box-shadow:0 0 0 3px darken($g, 10%);
        transform:translateZ(-25px) rotateY(90deg);
        position:absolute;
        top:40px;
        border-radius:0 0 0 50px;
        &:before{
          content:'';
          position:absolute;
          width:5px;
          height:100%;
          top:0;
          background:inherit;
          box-shadow:inherit;
          transform:rotateX(90deg);
        }
      }
      .wings{
        width:70px;
        height:20px;
        position:absolute;
        background:#fff;
        box-shadow:0 0 0 3px darken($g, 10%);
        left:-70px;
        top:30px;
        transform:translateZ(10px) rotateX(90deg);
        border-radius:10px 0px 0px 130px / 10px 0 0 75px;
        &:before{
          content:'';
          position:absolute;
          width:100%;
          height:100%;
          background:#fff;
          box-shadow:inherit;
          transform:scaleX(-1);
          left:80px;
          border-radius:inherit;
        }
      }
      .front, .rear{
        position:absolute;
        left:0;
        top:0;
        transform:rotateX(0deg);
        .side{
           height:20px;
           width:10px;
           position:absolute;
           transform-origin:50% calc(100% + 10px);
          &:before{
            content:'';
            position:absolute;
            width:100%;
            height:100%;
            transform-origin:bottom;
            transform:rotateX(90deg);
          }
          @for $i from 1 through 8{
            &:nth-of-type(#{$i}){
              transform:rotate(#{$i * 45}deg);
              &:before, &:after{
                background:lighten($b, ($i * 2%));
              }
              &:after{
                box-shadow:0 0 0 2px lighten($b, ($i * 2%));
              }
            }
          }
        }
      }
      .rear{
        left:0px;
        transform:rotateX(0deg) translateY(-10px) translateZ(-20px);
        .side{
          height:30px;
          &:before{
            transform:rotateX(100deg);
          }
        }
      }
      //offset-path:path('M 60 40 Q 280 20 260 140 Q 80 400 340 380 Q 380 380 400 300 C 380 240 460 160 80 260 C 0 300 0 40 60 40 ');
      offset-path:path('M 60 40 Q 280 20 260 140 Q 80 400 360 380 Q 400 360 400 280 C 380 240 460 160 80 260 C 0 300 0 260 0 440 C 0 560 140 420 240 520 C 280 560 400 540 380 500 C 400 460 340 260 420 300 C 460 320 580 260 560 460 C 560 520 540 580 240 560 C 160 560 160 280 240 220 C 260 180 420 240 480 220 C 560 220 540 20 380 40 C 260 40 280 80 240 200 C 220 280 140 280 40 240 C 0 240 0 40 60 40 ');
      offset-distance:0%;
      animation:fly 15s linear infinite, bounce 5s linear infinite alternate;
      @keyframes bounce{
        25%{
          transform:rotate(-270deg) translateZ(100px) rotateX(100deg);
        }
        50%{ transform:rotate(-270deg) translateZ(150px) rotateX(80deg);
        }
        100%{ transform:rotate(-270deg) translateZ(200px) rotateX(90deg);
        }
      }
      @keyframes fly{
        to{
          offset-distance:100%;
        }
      }
    }
    .inner{
      position:absolute;
      width:100%;
      height:100%;
      top:0;
      left:0;
      animation:spin 15s linear infinite;
      &:before{
        content:'';
        position:absolute;
        width:150%;
        height:150%;
        left:-25%;
        top:-25%;
        background:linear-gradient(to bottom, $t 275px, $g2 275px, $g2 310px, $t 310px), linear-gradient(to right, $t 280px, $g2 280px, $g2 330px, $t 330px), linear-gradient(to right, $t 620px, $g2 620px, $g2 670px, $t 670px), linear-gradient(to bottom, $t 600px, $g2 600px, $g2 650px, $t 650px), radial-gradient(circle at center, $gr, darken($gr, 20%) 60%);
        background-size:85% 100%, 100% calc(100% - 440px), 100% calc(100% - 100px), 85% 100%, 100%;
        background-repeat:no-repeat;
        border-radius:60px;
        box-shadow:0 0 0 20px darken($gr, 20%), inset 0 0 0 20px darken($gr, 20%);
      }
      @keyframes spin{
        to{
          transform:rotate(360deg);
        }
      }
    }
    .cell{
      position:absolute;
      width:100px;
      height:100px;
      left:calc(50% - 50px);
      top:calc(50% - 50px);
      --color:22, 40%;
      --l:60%;
      .side{
          &:before, &:after{
            content:'';
            position:absolute;
            width:90%;
            height:90%;
            left:5%;
            top:0%;
            background:inherit;
            mask:repeating-linear-gradient(to bottom, #fff 10px, $t 10px, $t 20px, #fff 20px, #fff 30px), repeating-linear-gradient(to right, #fff 10px, $t 10px, $t 20px, #fff 20px, #fff 30px);
            z-index:2;
          }
        &:after{
          mask:none;
          background:repeating-linear-gradient(to bottom, $t 10px, $t 10px, $t 19px, var(--color-primary-darker) 19px, $t 30px), lighten($bl, 10%);
          z-index:0;
        }
          
        &:last-of-type{
          &:before, &:after{
            background:var(--color-primary);
            width:90%;
            height:90%;
            left:5%;
            top:5%;
            mask:none;
          }
        }
      }
      &:nth-of-type(2){
        left:50px;
        top:50px;
        transform:scale(0.65);
        --color:162, 40%;
        --l:70%;
        .side{
          height:300%;
          &:last-of-type{
            transform:translateZ(299px);
          }
        }
      }
      &:nth-of-type(3){
        left:250px;
        top:50px;
        transform:scale(0.75);
        --color:82, 10%;
        --l:80%;
        .side{
          height:250%;
          &:last-of-type{
            transform:translateZ(248px);
          }
        }
      }
      &:nth-of-type(4){
        left:360px;
        top:300px;
        transform:scale(0.85);
        --color:52, 60%;
        --l:80%;
        .side{
          height:250%;
          &:last-of-type{
            transform:translateZ(248px);
          }
        }
      }
      &:nth-of-type(5){
        left:200px;
        top:350px;
        --color:122, 10%;
        --l:90%;
        .side{
          height:150%;
          &:before, &:after{
            height:70%;
          }
          &:last-of-type{
            transform:translateZ(148px);
            &:before, &:after{
              height:90%;
            }
          }
        }
      }
      &:nth-of-type(6){
        left:0px;
        top:290px;
        --color:62, 40%;
        --l:90%;
        .side{
          height:200%;
          &:last-of-type{
            transform:translateZ(199px);
          }
        }
      }
      .side{
        position:absolute;
        height:400%;
        width:100%;
        bottom:0;
        left:0;
        animation:darken 15s linear infinite;
        --color-primary: hsl(var(--color),var(--l));
        --color-primary-darker: hsl(var(--color),calc(var(--l) - 20%));
         --color-primary-darkest: hsl(var(--color),calc(var(--l) - 50%));
        --color-primary-lighter: hsl(var(--color),calc(var(--l) - -5%));
        @keyframes darken{
          0%{
            background:var(--color-primary);
          }
          50%{
            background:var(--color-primary-darkest);
          }
          100%{
            background:var(--color-primary);
          }
        }
        &:nth-of-type(1){
          transform-origin:bottom;
          transform:rotateX(-90deg);
          animation-delay:0s;
        }
        &:nth-of-type(2){
          transform-origin:0% 100%;
          transform:rotateX(-90deg) rotateY(270deg) translateX(-100%);
          animation-delay:-3.75s;
        }
        &:nth-of-type(3){
          transform-origin:bottom;
          transform:rotateX(-90deg) rotateY(180deg);
          bottom:100%;
          animation-delay:-7.5s;
        }
        &:nth-of-type(4){
          transform-origin:100% 100%;
          transform:rotateX(-90deg) rotateY(90deg) translateX(100%);
          animation-delay:-11.25s;
        }
        &:nth-of-type(5){
          background:var(--color-primary-darker);
          animation:none;
          height:100%;
          width:100%;
          transform:translateZ(399px);
        }
      }
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console