cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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 id="wrapper">
  <input type="checkbox" id="button1" checked>
  <label for="button1" data-title="PAUSE">PLAY</label>
  <input type="checkbox" id="button2">
  <label for="button2" data-title="PLAY">STOP</label>
  <span id="fakeStop">STOP</span>
  <div class="digit dp100000 d6">
    <div class="particle top"></div>
    <div class="particle top right"></div>
    <div class="particle top left"></div>
    <div class="particle middle"></div>
    <div class="particle bottom right"></div>
    <div class="particle bottom left"></div>
    <div class="particle bottom"></div>
  </div>
  <div class="digit dp10000">
    <div class="particle top"></div>
    <div class="particle top right"></div>
    <div class="particle top left"></div>
    <div class="particle middle"></div>
    <div class="particle bottom right"></div>
    <div class="particle bottom left"></div>
    <div class="particle bottom"></div>
  </div>
  <div class="separator">
    <div class="dot top"></div>
    <div class="dot bottom"></div>
  </div>
  <div class="digit dp1000 d6">
    <div class="particle top"></div>
    <div class="particle top right"></div>
    <div class="particle top left"></div>
    <div class="particle middle"></div>
    <div class="particle bottom right"></div>
    <div class="particle bottom left"></div>
    <div class="particle bottom"></div>
  </div>
  <div class="digit dp100">
    <div class="particle top"></div>
    <div class="particle top right"></div>
    <div class="particle top left"></div>
    <div class="particle middle"></div>
    <div class="particle bottom right"></div>
    <div class="particle bottom left"></div>
    <div class="particle bottom"></div>
  </div>
  <div class="separator">
    <div class="dot top"></div>
    <div class="dot bottom"></div>
  </div>
  <div class="digit dp10">
    <div class="particle top"></div>
    <div class="particle top right"></div>
    <div class="particle top left"></div>
    <div class="particle middle"></div>
    <div class="particle bottom right"></div>
    <div class="particle bottom left"></div>
    <div class="particle bottom"></div>
  </div>
  <div class="digit dp1">
    <div class="particle top"></div>
    <div class="particle top right"></div>
    <div class="particle top left"></div>
    <div class="particle middle"></div>
    <div class="particle bottom right"></div>
    <div class="particle bottom left"></div>
    <div class="particle bottom"></div>
  </div>
</div>
            
          
!
            
              /* layout */
body {
  background:#333;
  font-family:sans-serif;
}
#wrapper {
  width:260px;
	margin:100px auto;
}

/* general item styles */
.digit {
	position:relative;
	float:left;
	width:30px;
	height:40px;
	box-shadow:0 0 4px rgba(0,0,0,.5);
	margin:0 4px;
}
.particle {
	position:absolute;
	background:#cc0;
	box-shadow:0 0 5px #cc0;
}
.separator {
	position:relative;
	float:left;
	width:8px;
	margin:0 4px;
}
.dot {
	width:8px;
	height:8px;
	background:#cc0;
	box-shadow:0 0 5px #cc0;
	border-radius:4px;
}
input {
	display:none;
}
label, label:before, #fakeStop {
	display:block;
	position:absolute;
	margin:3px 0 0 -50px;
	padding:1px 3px;
	background:#cc0;
	border-radius:2px;
	width:32px;
	font-size:9px;
	cursor:pointer;
}
#fakeStop {
	cursor:default;
	opacity:.4;
}
label:before {
	content:attr(data-title);
	margin:-1px 0 0 -3px;
}
label[for=button2], #fakeStop {
	margin-top:24px;
}
label[for=button2], label:before,
#button1:checked ~ #fakeStop {
	display:none;
}
#button2:checked ~ label[for=button2] {
	margin-top:3px;
}
#button1:checked ~ label[for=button1]:before,
#button1:checked ~ label[for=button2],
#button2:checked ~ label[for=button2]:before,
#button1:checked ~ #button2:checked ~ #fakeStop {
	display:block;
}

/* positioning & dimensions */
.top {
	top:0;
}
.bottom {
	bottom:0;
}
.left {
	left:0;
}
.right {
	right:0;
}
.middle {
	top:17px;
}
.particle.top, .particle.middle, .particle.bottom {
	width:14px;
	height:5px;
	margin:0 0 0 8px;
}
.particle.middle {
	height:6px;
}
.particle.right, .particle.left {
	width:5px;
	height:8px;
	margin:7px 0 0 0;
}
.particle.bottom.right, .particle.bottom.left {
	margin:0 0 7px 0;
}
.dot.top {
	margin-top:8px;
}
.dot.bottom {
	margin-top:8px;
}

/* corners */
.particle:before, .particle:after {
	content:'';
	position:absolute;
	z-index:2;
	display:block;
	width: 0px;
	height: 0px;
	border-style: solid;
}
.particle.top:before {
	margin:0 0 0 -5px;
	border-width: 0 5px 5px 0;
	border-color: transparent #cc0 transparent transparent;
}
.particle.top:after {
	margin:0 0 0 14px;
	border-width: 5px 5px 0 0;
	border-color: #cc0 transparent transparent transparent;
}
.particle.top.right:before {
	margin:-5px 0 0 0;
	border-width: 0 0 5px 5px;
	border-color: transparent transparent #cc0 transparent;
}
.particle.top.right:after {
	margin:8px 0 0 0;
	border-width: 0 5px 3px 0;
	border-color: transparent #cc0 transparent transparent;
}
.particle.top.left:before {
	margin:-5px 0 0 0;
	border-width: 5px 0 0 5px;
	border-color: transparent transparent transparent #cc0;
}
.particle.top.left:after {
	margin:8px 0 0 0;
	border-width: 3px 5px 0 0;
	border-color: #cc0 transparent transparent transparent;
}
.particle.middle:before {
	margin:0 0 0 -5px;
	border-width: 3px 5px 3px 0;
	border-color: transparent #cc0 transparent transparent;
}
.particle.middle:after {
	margin:0 0 0 14px;
	border-width: 3px 0 3px 5px;
	border-color: transparent transparent transparent #cc0;
}
.particle.bottom.right:before {
	margin:-3px 0 0 0;
	border-width: 0 0 3px 5px;
	border-color: transparent transparent #cc0 transparent;
}
.particle.bottom.right:after {
	margin:8px 0 0 0;
	border-width: 0 5px 5px 0;
	border-color: transparent #cc0 transparent transparent;
}
.particle.bottom.left:before {
	margin:-3px 0 0 0;
	border-width: 3px 0 0 5px;
	border-color: transparent transparent transparent #cc0;
}
.particle.bottom.left:after {
	margin:8px 0 0 0;
	border-width: 5px 5px 0 0;
	border-color: #cc0 transparent transparent transparent;
}
.particle.bottom:before {
	margin:0 0 0 -5px;
	border-width: 0 0 5px 5px;
	border-color: transparent transparent #cc0 transparent;
}
.particle.bottom:after {
	margin:0 0 0 14px;
	border-width: 5px 0 0 5px;
	border-color: transparent transparent transparent #cc0;
}

/* animations */
@keyframes initial-visible {
	0% {opacity:1;}
	100% {opacity:1;}
}

@keyframes initial-hidden {
	0% {opacity:.1;}
	100% {opacity:.1;}
}

@keyframes flash {
	0% {opacity:1;}
	49.999% {opacity:1;}
	50% {opacity:.1;}
	100% {opacity:.1;}
}

@keyframes top-10 {
	0% {opacity:1;}
	9.999% {opacity:1;}
	10% {opacity:.1;}
	19.999% {opacity:.1;}
	20% {opacity:1;}
	30% {opacity:1;}
	39.999% {opacity:1;}
	40% {opacity:.1;}
	49.999% {opacity:.1;}
	50% {opacity:1;}
	60% {opacity:1;}
	70% {opacity:1;}
	80% {opacity:1;}
	90% {opacity:1;}
	100% {opacity:1;}
}
@keyframes top-right-10 {
	0% {opacity:1;}
	10% {opacity:1;}
	20% {opacity:1;}
	30% {opacity:1;}
	40% {opacity:1;}
	49.999% {opacity:1;}
	50% {opacity:.1;}
	60% {opacity:.1;}
	69.999% {opacity:.1;}
	70% {opacity:1;}
	80% {opacity:1;}
	90% {opacity:1;}
	100% {opacity:1;}
}
@keyframes top-left-10 {
	0% {opacity:1;}
	9.999% {opacity:1;}
	10% {opacity:.1;}
	20% {opacity:.1;}
	30% {opacity:.1;}
	39.999% {opacity:.1;}
	40% {opacity:1;}
	50% {opacity:1;}
	60% {opacity:1;}
	69.999% {opacity:1;}
	70% {opacity:.1;}
	79.999% {opacity:.1;}
	80% {opacity:1;}
	90% {opacity:1;}
	100% {opacity:1;}
}
@keyframes middle-10 {
	0% {opacity:.1;}
	10% {opacity:.1;}
	19.999% {opacity:.1;}
	20% {opacity:1;}
	30% {opacity:1;}
	40% {opacity:1;}
	50% {opacity:1;}
	60% {opacity:1;}
	69.999% {opacity:1;}
	70% {opacity:.1;}
	79.999% {opacity:.1;}
	80% {opacity:1;}
	90% {opacity:1;}
	100% {opacity:1;}
}
@keyframes bottom-right-10 {
	0% {opacity:1;}
	10% {opacity:1;}
	19.999% {opacity:1;}
	20% {opacity:.1;}
	29.999% {opacity:.1;}
	30% {opacity:1;}
	40% {opacity:1;}
	50% {opacity:1;}
	60% {opacity:1;}
	70% {opacity:1;}
	80% {opacity:1;}
	90% {opacity:1;}
	100% {opacity:1;}
}
@keyframes bottom-left-10 {
	0% {opacity:1;}
	9.999% {opacity:1;}
	10% {opacity:.1;}
	19.999% {opacity:.1;}
	20% {opacity:1;}
	29.999% {opacity:1;}
	30% {opacity:.1;}
	40% {opacity:.1;}
	50% {opacity:.1;}
	59.999% {opacity:.1;}
	60% {opacity:1;}
	69.999% {opacity:1;}
	70% {opacity:.1;}
	79.999% {opacity:.1;}
	80% {opacity:1;}
	89.999% {opacity:1;}
	90% {opacity:.1;}
	100% {opacity:.1;}
}
@keyframes bottom-10 {
	0% {opacity:1;}
	9.999% {opacity:1;}
	10% {opacity:.1;}
	19.999% {opacity:.1;}
	20% {opacity:1;}
	30% {opacity:1;}
	39.999% {opacity:1;}
	40% {opacity:.1;}
	49.999% {opacity:.1;}
	50% {opacity:1;}
	60% {opacity:1;}
	69.999% {opacity:1;}
	70% {opacity:.1;}
	79.999% {opacity:.1;}
	80% {opacity:1;}
	90% {opacity:1;}
	100% {opacity:1;}
}
@keyframes top-6 {
	0% {opacity:1;}
	16.665% {opacity:1;}
	16.666% {opacity:.1;}
	33.332% {opacity:.1;}
	33.333% {opacity:1;}
	50% {opacity:1;}
	66.665% {opacity:1;}
	66.666% {opacity:.1;}
	83.332% {opacity:.1;}
	83.333% {opacity:1;}
	100% {opacity:1;}
}
@keyframes top-right-6 {
	0% {opacity:1;}
	16.666% {opacity:1;}
	33.333% {opacity:1;}
	50% {opacity:1;}
	66.666% {opacity:1;}
	83.332% {opacity:1;}
	83.333% {opacity:.1;}
	100% {opacity:.1;}
}
@keyframes top-left-6 {
	0% {opacity:1;}
	16.665% {opacity:1;}
	16.666% {opacity:.1;}
	33.333% {opacity:.1;}
	50% {opacity:.1;}
	66.665% {opacity:.1;}
	66.666% {opacity:1;}
	83.333% {opacity:1;}
	100% {opacity:1;}
}
@keyframes middle-6 {
	0% {opacity:.1;}
	16.666% {opacity:.1;}
	33.332% {opacity:.1;}
	33.333% {opacity:1;}
	50% {opacity:1;}
	66.666% {opacity:1;}
	83.333% {opacity:1;}
	100% {opacity:1;}
}
@keyframes bottom-right-6 {
	0% {opacity:1;}
	16.666% {opacity:1;}
	33.332% {opacity:1;}
	33.333% {opacity:.1;}
	49.999% {opacity:.1;}
	50% {opacity:1;}
	66.666% {opacity:1;}
	83.333% {opacity:1;}
	100% {opacity:1;}
}
@keyframes bottom-left-6 {
	0% {opacity:1;}
	16.665% {opacity:1;}
	16.666% {opacity:.1;}
	33.332% {opacity:.1;}
	33.333% {opacity:1;}
	49.999% {opacity:1;}
	50% {opacity:.1;}
	66.666% {opacity:.1;}
	83.333% {opacity:.1;}
	100% {opacity:.1;}
}
@keyframes bottom-6 {
	0% {opacity:1;}
	16.665% {opacity:1;}
	16.666% {opacity:.1;}
	33.332% {opacity:.1;}
	33.333% {opacity:1;}
	50% {opacity:1;}
	66.665% {opacity:1;}
	66.666% {opacity:.1;}
	83.332% {opacity:.1;}
	83.333% {opacity:1;}
	100% {opacity:1;}
}

.particle, .separator {
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	animation-play-state: paused;
}
.particle.top { animation-name: top-10; }
.particle.top.right { animation-name: top-right-10; }
.particle.top.left { animation-name: top-left-10; }
.particle.middle { animation-name: middle-10; }
.particle.bottom.right { animation-name: bottom-right-10; }
.particle.bottom.left { animation-name: bottom-left-10; }
.particle.bottom { animation-name: bottom-10; }

.d6 .particle.top { animation-name: top-6; }
.d6 .particle.top.right { animation-name: top-right-6; }
.d6 .particle.top.left { animation-name: top-left-6; }
.d6 .particle.middle { animation-name: middle-6; }
.d6 .particle.bottom.right { animation-name: bottom-right-6; }
.d6 .particle.bottom.left { animation-name: bottom-left-6; }
.d6 .particle.bottom { animation-name: bottom-6; }

.dp1 .particle { animation-duration: .1s; }
.dp10 .particle { animation-duration: 1s; }
.dp100 .particle { animation-duration: 10s; }
.dp1000 .particle { animation-duration: 60s; }
.dp10000 .particle { animation-duration: 600s; }
.dp100000 .particle { animation-duration: 3600s; }

.separator {
	animation-name: flash;
	animation-duration: 1s;
}

#button1:checked ~ .digit .particle,
#button1:checked ~ .separator {
	animation-play-state: running;
}
#button2:checked ~ .digit .particle,
#button2:checked ~ .separator {
	animation-name: initial-visible;
}
#button2:checked ~ .digit .particle.middle {
	animation-name: initial-hidden;
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console