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>
Setup @keyframes sets to move the first three shapes (.p1, .p2, and .p3) in random orders and have the square shape (.p1) be the only shape left over.

Infinite Chocolate: http://youtu.be/liI7rm5o1Rc

$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;
    animation: p1Ani 3s 1s both $bezier-shape;

  .p2 {
    position: absolute;
    height: 220px;
    width: 0;
    border-left: 300px solid brown;
    border-bottom: 71px solid transparent;
    animation: p2Ani 3s 1s both $bezier-shape;

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

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

/* Adjust the transforms and keyframe sets below */
@keyframes p1Ani {
  from { transform: translate(0,0); }
  33% { transform: translate(0,0); }
  66% { transform: translate(0,0); }
  to { transform: translate(0,0); }

@keyframes p2Ani {
  from { transform: translate(100px,0); }
  33% { transform: translate(100px,0); }
  66% { transform: translate(100px,0); }
  to { transform: translate(100px,0); }

@keyframes p3Ani {
  from { transform: translate(0,100px); }
  33% { transform: translate(0,100px); }
  66% { transform: translate(0,100px); }
  to { transform: translate(0,100px); }
Loading ..................