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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console