cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              <div class="rectangle">
  <div class="p1"></div>
  <div class="p2"></div>
  <div class="p3"></div>
  <div class="p4"></div>
              $bezier-shape: cubic-bezier(.4,.2,0,1);

html,body { height: 100%; }

body { perspective: 1000px; }

.rectangle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 614px;
  transform: translate3d(-50%,-50%,0);
  transform-style: preserve-3d;

  .p1 {
    position: absolute;
    background-color: brown;
    height: 100px;
    width: 100px;
    transform: translate3d(0,0,0);
    animation: p1Ani 3s 1s forwards $bezier-shape;

  .p2 {
    position: absolute;
    height: 220px;
    width: 0;
    border-left: 300px solid brown;
    border-bottom: 71px solid transparent;
    transform: translate3d(100px,0,0);
    animation: p2Ani 3s 1s forwards $bezier-shape;

  .p3 {
    position: absolute;
    height: 191px;
    width: 0;
    border-left: 100px solid brown;
    border-bottom: 24px solid transparent;
    transform: translate3d(0,100px,0);
    animation: p3Ani 3s 1s forwards $bezier-shape;

  .p4 {
    position: absolute;
    height: 300px;
    width: 0;
    border-right: 400px solid brown;
    border-top: 95px solid transparent;
    transform: translate3d(0,219px,0);

@keyframes p1Ani {
  25% { transform: translate3d(-150px,-50px,0) scale(.8) rotate(45deg); }
  50% { transform: translate3d(430px,-50px,0) scale(1) rotate(0); }
  75% { transform: translate3d(430px,130px,0) scale(.3) rotate(3turn); }
  to { transform: translate3d(-130px,29px,0) scale(1) rotate(0); }

@keyframes p2Ani {
  33% { transform: translate3d(100px,0,0) scale(.7) rotate(0); } 
  66% { transform: translate3d(0,29px,0) scale(.7) rotate(1turn); }
  to { transform: translate3d(0,29px,0) scale(1); }

@keyframes p3Ani {
  33% { transform: translate3d(0,100px,0) scale(.7) rotate(0); }
  66% { transform: translate3d(300px,29px,0) scale(.7) rotate(-1turn); }
  to {  transform: translate3d(300px,29px,0) scale(1); }
Loading ..................