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="frame">
  <div class="edges">
		<div class="edge t"></div>
		<div class="edge l"></div>
		<div class="edge r"></div>
		<div class="edge b"></div>
  </div>
	<div class="elements">
		<div class="square square1 small c1"></div>
		<div class="square square2 big c2"></div>
		<div class="square square3 c1"></div>
		<div class="square square4 small c3"></div>
		<div class="square square5 c1"></div>
		<div class="square square6 big c1"></div>
		<div class="square square7 c3"></div>
		<div class="square square8 small c3"></div>
		<div class="circle circle1 small c1"></div>
		<div class="circle circle2 c2"></div>
		<div class="circle circle3 small c3"></div>
		<div class="circle circle4 big c1"></div>
		<div class="circle circle5 c3"></div>
		<div class="circle circle6 small c2"></div>
		<div class="circle circle7 c1"></div>
		<div class="circle circle8 small c3"></div>
	</div>
</div>
            
          
!
            
              $bezierEdges: cubic-bezier(.19,.69,.4,1);
$bezierElements: cubic-bezier(.19,.69,.4,1);
$duration: 1.5s;
$numberOfSingleElements: 8; // sync with HTML
$c1: #f39c12; 
$c2: #e67e22; 
$c3: #1abc9c; 

.frame {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 400px;
	height: 400px;
	margin-top: -200px;
	margin-left: -200px;
	border-radius: 2px;
	box-shadow: 1px 2px 10px 0px rgba(0,0,0,0.3);
	overflow: hidden;
	background: #2c3e50;
	color: #fff;
	font-family: 'Open Sans', Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.edges {
	position: absolute;
	z-index: 10;
	width: 160px;
	height: 160px;
	top: 120px;
	left: 120px;

	.edge {
		position: absolute;
		width: 0;
		height: 0;
		border-style: solid;

		&.t {
			top: 0;
			left: 0;
			border-width: 80px 80px 0 80px;
			border-color: #3F91C7 transparent transparent transparent;
			animation: edge-t $duration $bezierEdges infinite alternate;
		}

		&.l {
			top: 0;
			left: 0;
			border-width: 80px 0 80px 80px;
			border-color: transparent transparent transparent #3289C3;
			animation: edge-l $duration $bezierEdges infinite alternate;
		}

		&.r {
			top: 0;
			right: 0;
			border-width: 80px 80px 80px 0;
			border-color: transparent #2B82BB transparent transparent;
			animation: edge-r $duration $bezierEdges infinite alternate;
		}

		&.b {
			bottom: 0;
			right: 0;
			border-width: 0 80px 80px 80px;	
			border-color: transparent transparent #2578AE transparent;
			animation: edge-b $duration $bezierEdges infinite alternate;
		}

	}

}

@keyframes edge-t {
	0%, 20% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(-180px);
	}
}

@keyframes edge-l {
	0%, 20% {
		transform: translateY(0);
	}
	100% {
		transform: translateX(-180px);
	}
}

@keyframes edge-r {
	0%, 20% {
		transform: translateY(0);
	}
	100% {
		transform: translateX(180px);
	}
}

@keyframes edge-b {
	0%, 20% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(180px);
	}
}

.elements {
	position: absolute;
	width: 30px;
	height: 30px;
	top: 185px;
	left: 185px;

	.square {
		position: absolute;
		width: 20px;
		height: 20px;
		top: 5px;
		left: 5px;

		&.small {
			width: 10px;
			height: 10px;
			top: 10px;
			left: 10px;
		}

		&.big {
			width: 30px;
			height: 30px;
			top: 0;
			left: 0;
		}

		&.c1 {
			background: $c1;
		}

		&.c2 {
			background: $c2;
		}

		&.c3 {
			background: $c3;
		}

		@for $i from 1 through $numberOfSingleElements {
			&#{$i} {
				animation: square+($i) $duration $bezierElements infinite alternate; 
			}
		}

	}

	.circle {
		position: absolute;
		box-sizing: border-box;
		width: 20px;
		height: 20px;
		border-radius: 50%;
		border-style: solid;
		border-width: 4px;
		top: 5px;
		left: 5px;

		&.small {
			width: 10px;
			height: 10px;
			border-width: 2px;
			top: 10px;
			left: 10px;
		}

		&.big {
			width: 30px;
			height: 30px;
			border-width: 8px;
			top: 0;
			left: 0;
		}

		&.c1 {
			border-color: $c1;
		}

		&.c2 {
			border-color: $c2;
		}

		&.c3 {
			border-color: $c3;
		}

		@for $i from 1 through $numberOfSingleElements {
			&#{$i} {
				animation: circle+($i) $duration $bezierElements infinite alternate; 
			}
		}

	}

}

// @for $i from 1 through $numberOfSingleElements {
// 	@keyframes square#{$i} {
// 		$x: random(300) - 150px;
// 		$y: random(300) - 150px;
// 		$degree: random(90) + 90deg; 
// 		0%, 20% {
// 			transform: scale(0) translate(0) rotate(0);
// 		}
// 		100% {
// 			transform: scale(1) translate($x, $y) rotate($degree);
// 		}
// 	}
// }
// 
// @for $i from 1 through $numberOfSingleElements {
// 	@keyframes circle#{$i} {
// 		$x: random(300) - 150px;
// 		$y: random(300) - 150px;
// 		0%, 20% {
// 			transform: scale(0) translate(0);
// 		}
// 		100% {
// 			transform: scale(1) translate($x, $y);
// 		}
// 	}
// }

@keyframes square1 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(66px, 78px) rotate(110deg);
  }
}
@keyframes square2 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(46px, -141px) rotate(163deg);
  }
}
@keyframes square3 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(131px, -117px) rotate(126deg);
  }
}
@keyframes square4 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(91px, -94px) rotate(122deg);
  }
}
@keyframes square5 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(131px, -10px) rotate(111deg);
  }
}
@keyframes square6 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(-94px, -66px) rotate(125deg);
  }
}
@keyframes square7 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(-102px, 50px) rotate(139deg);
  }
}
@keyframes square8 {
  0%, 20% {
    transform: scale(0) translate(0) rotate(0);
  }
  100% {
    transform: scale(1) translate(-62px, 20px) rotate(118deg);
  }
}
@keyframes circle1 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(13px, -113px);
  }
}
@keyframes circle2 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(29px, -71px);
  }
}
@keyframes circle3 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(1px, -72px);
  }
}
@keyframes circle4 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(-62px, 132px);
  }
}
@keyframes circle5 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(18px, 86px);
  }
}
@keyframes circle6 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(62px, 15px);
  }
}
@keyframes circle7 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(74px, -25px);
  }
}
@keyframes circle8 {
  0%, 20% {
    transform: scale(0) translate(0);
  }
  100% {
    transform: scale(1) translate(95px, -45px);
  }
}
            
          
!
999px
Loading ..................

Console