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.

            
              .frame
	input type="checkbox" id="button" name="state"
	label class="icon" for="button"
		.pause
		.play
	.counter
		div class="thousands number"
			-for i in (0..9)
				span class="number-#{i}" #{i}
		div class="hundreds number"
			-for i in (0..9)
				span class="number-#{i}" #{i}
		div class="tens number"
			-for i in (0..9)
				span class="number-#{i}" #{i}
		div class="units number"
			-for i in (0..9)
				span class="number-#{i}" #{i}
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Open+Sans:400);

.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: #313C46;
  color: #fff;
	font-family: 'Open Sans', Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

#button {
	display: none;
}

.icon {
	position: absolute;
	width: 16px;
	height: 20px;
	top: 240px;
	left: 192px;
	cursor: pointer;
	
	.pause {
		position: absolute;
		width: 16px;
		height: 20px;
		top: 0;
		left: 0;
		transition: all .3s ease-in-out;
		transform: scale(1);
		opacity: 1;
		
		&:before,
		&:after {
			position: absolute;
			display: block;
			content: '';
			width: 5px;
			height: 20px;
			top: 0;
			left: 0;
			background: #fff;
		}
		
		&:after {
			left: initial;
			right: 0;
		}
	}
	
	.play {
		position: absolute;
		width: 0;
		height: 0;
		top: 0;
		left: 0;
		border-style: solid;
		border-width: 10px 0 10px 16px;
		border-color: transparent transparent transparent #ffffff;
		transition: all .3s ease-in-out;
		transform: scale(0);
		opacity: 0;
	}
	
}

#button:checked ~ .icon {
	
	.pause {
		transform: scale(0);
		opacity: 0;
	}
	
	.play {
		transform: scale(1);
		opacity: 1;
	}
	
}

#button:checked ~ .counter {
	.units, .tens, .hundreds {
		animation-play-state: paused;
	}
}

.counter {
	box-sizing: border-box;
	position: absolute;
	width: 100px;
	height: 40px;
	top: 180px;
	left: 150px;
	background: #fff;
	border-radius: 3px;
	box-shadow: 2px 4px 8px 0 rgba(0,0,0,0.3);
	padding: 0 6px;
	overflow: hidden;
	
	.number {
		float: left;

		span {
			display: block;
			height: 40px;
			width: 22px;
			text-align: center;
			font-size: 30px;
			line-height: 40px;
			font-weight: 400;
			color: #478BB8;
		}

	}
	
	.units {
		animation: count 10s steps(1) infinite;
	}
	.tens {
		animation: count 100s steps(1) infinite;
	}
	.hundreds {
		animation: count 1000s steps(1) infinite;
	}
	.thousands {
		animation: count 10000s steps(1) infinite;
	}

}

@keyframes count {
	@for $i from 0 through 9 {
		#{$i}0% {
			transform: translateY( ($i * -40)+px );
		}
	}
}
            
          
!
999px
Loading ..................

Console