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 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.

            
              h1 CSS LOADERS
p
	button Click for demo
.box loader-01
	.loader-01
.box loader-02
	.loader-02
.box loader-03
	.loader-03
.box loader-04
	.loader-04
.box loader-05
	.loader-05
.box loader-06
	.loader-06
.box loader-07
	.loader-07
.box loader-08
	.loader-08
.box loader-09
	.loader-09
.box loader-10
	.loader-10
.box loader-11
	.loader-11
.box loader-12
	.loader-12
.box loader-13
	.loader-13
.box loader-14
	.loader-14
.box loader-15
	.loader-15
.box loader-16
	.loader-16
.box loader-17
	.loader-17
.box loader-18
	.loader-18
.box loader-19
	.loader-19
.box loader-20
	.loader-20
.box loader-21
	.loader-21
.box loader-22
	.loader-22
.box loader-23
	.loader-23
.box loader-24
	.loader-24
.box loader-25
	.loader-25
.box loader-26
	.loader-26
.box loader-27
	.loader-27
.box loader-28
	.loader-28
.box loader-29
	.loader-29
.box loader-30
	.loader-30
.box loader-31
	.loader-31
.box loader-32
	.loader-32
.box loader-33
	.loader-33
.box loader-34
	.loader-34
.box loader-35
	.loader-35
.box loader-36
	.loader-36
.box loader-37
	.loader-37
.box loader-38
	.loader-38
.box loader-39
	.loader-39
.box loader-40
	.loader-40
.box loader-41
	.loader-41
.box loader-42
	.loader-42
.box loader-43
	.loader-43
.box loader-44
	.loader-44
.box loader-45
	.loader-45
.box loader-46
	.loader-46
.box loader-47
	.loader-47
.box loader-48
	.loader-48
.box loader-49
	.loader-49
.box loader-50
	.loader-50
.box loader-51
	.loader-51
.box loader-52
	.loader-52
.box loader-53
	.loader-53
.box loader-54
	.loader-54
.box loader-55
	.loader-55
.box loader-56
	.loader-56
.box loader-57
	.loader-57
.box loader-58
	.loader-58
.box loader-59
	.loader-59
.box loader-60
	.loader-60
.box loader-61
	.loader-61
.box loader-62
	.loader-62
.box loader-63
	.loader-63
.box loader-64
	.loader-64
.box loader-65
	.loader-65
.box loader-66
	.loader-66
.box loader-67
	.loader-67
.box loader-68
	.loader-68
.box loader-69
	.loader-69
.box loader-70
	.loader-70
.box loader-71
	.loader-71
.box loader-72
	.loader-72
.box loader-73
	.loader-73
.box loader-74
	.loader-74
.box loader-75
	.loader-75
.box loader-76
	.loader-76
.box loader-77
	.loader-77
.box loader-78
	.loader-78
.box loader-79
	.loader-79
.box loader-80
	.loader-80
.box loader-81
	.loader-81
.box loader-82
	.loader-82
.box loader-83
	.loader-83
.box loader-84
	.loader-84
.box loader-85
	.loader-85
.box loader-86
	.loader-86
.box loader-87
	.loader-87
.box loader-88
	.loader-88
.box loader-89
	.loader-89
.box loader-90
	.loader-90
.box loader-91
	.loader-91
.box loader-92
	.loader-92
.box loader-93
	.loader-93
.box loader-94
	.loader-94
.box loader-95
	.loader-95
.box loader-96
	.loader-96
.box loader-97
	.loader-97
.box loader-98
	.loader-98
.box loader-99
	.loader-99
            
          
!
            
              body {
	//background: #323943;
	
  background: radial-gradient(ellipse farthest-corner at center bottom, #69d2fb 0%, #20438E 100%) center bottom / 100% fixed;
	text-align: center;
	box-sizing: border-box;
	font-family: sans-serif;
	color: rgba(255, 255, 255, .8);
	*,
	*:before,
	*:after {
		box-sizing: inherit;
	}
	&:hover > * {
		opacity: .5;
	}
}

.box {
	display: inline-block;
	width: 200px;
	height: 200px;
	border: 1px solid currentcolor;
	border-radius: 3px;
	font-size: 30px;
	padding: 1em;
	position: relative;
	margin-bottom: .25em;
	vertical-align: top;
	transition: .3s color, .3s border, .3s transform, .3s opacity;
	// &:not(:hover) {
	// 	[class*="loader-"] {
	// 		animation: none;
	// 		&:before, &:after {
	// 			animation: none;
	// 		}
	// 	}
	// }
	&:hover {
		color: #fff; //#d60b52;
		background-color: rgba(0,0,0,.1);
		font-size: 0;
		padding: 0;
		border-width: 3px;
		line-height: 200px;
		opacity: 1;
		transform: scale(1.2);
		z-index: 2;
		[class*="loader-"] {
			font-size: 70px;
			line-height: 200px;
		}
	}
}

button {
	display: inline-block;
	background: transparent;
	border: 2px solid currentcolor;
	color: white;
	padding: .5em 1em;
	border-radius: 5px;
	font-size: calc(16px + 2vw);
	
}

[class*="loader-"] {
	display: inline-block;
	width: 1em;
	height: 1em;
	color: inherit;
	vertical-align: middle;
	pointer-events: none;
}

.loader-01 {
	border: .2em dotted currentcolor;
	border-radius: 50%;
	animation: 1s loader-01 linear infinite;
}

@keyframes loader-01 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

////////////////////////////////////////
.loader-02 {
	border: .2em solid transparent;
	border-left-color: currentcolor;
	border-right-color: currentcolor;
	border-radius: 50%;
	animation: 1s loader-02 linear infinite;
}

@keyframes loader-02 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/////////////////////////////////////
.loader-03 {
	border: .2em solid currentcolor;
	border-bottom-color: transparent;
	border-radius: 50%;
	animation: 1s loader-03 linear infinite;
	position: relative;
}

@keyframes loader-03 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/////////////////////////////////////
.loader-04 {
	border: 1px solid currentcolor;
	border-radius: 50%;
	animation: 1s loader-04 linear infinite;
	position: relative;
	&:before {
		content: '';
		display: block;
		width: 0;
		height: 0;
		position: absolute;
		top: -.2em;
		left: 50%;
		border: .2em solid currentcolor;
		border-radius: 50%;
	}
}

@keyframes loader-04 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/////////////////////////////////////
.loader-05 {
	border: .2em solid transparent;
	border-top-color: currentcolor;
	border-radius: 50%;
	animation: 1s loader-05 linear infinite;
	position: relative;
	&:before {
		content: '';
		display: block;
		width: inherit;
		height: inherit;
		position: absolute;
		top: -.2em;
		;
		left: -.2em;
		;
		border: .2em solid currentcolor;
		border-radius: 50%;
		opacity: .5;
	}
}

@keyframes loader-05 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

////////////////////////////////////////
.loader-06 {
	border: .2em solid currentcolor;
	border-radius: 50%;
	animation: loader-06 1s ease-out infinite;
}

@keyframes loader-06 {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 0;
	}
}

///////////////////////////////////////
.loader-07 {
	border: 0 solid transparent;
	border-radius: 50%;
	position: relative;
	&:before,
	&:after {
		content: '';
		border: .2em solid currentcolor;
		border-radius: 50%;
		width: inherit;
		height: inherit;
		position: absolute;
		top: 0;
		left: 0;
		animation: loader-07 1s linear infinite;
		opacity: 0;
	}
	&:before {
		animation-delay: 1s;
	}
	&:after {
		animation-delay: .5s;
	}
}

@keyframes loader-07 {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 0;
	}
}

///////////////////////////////////////
.loader-08 {
	position: relative;
	&:before,
	&:after {
		content: '';
		width: inherit;
		height: inherit;
		border-radius: 50%;
		background-color: currentcolor;
		opacity: 0.6;
		position: absolute;
		top: 0;
		left: 0;
		animation: loader-08 2.0s infinite ease-in-out;
	}
	&:after {
		animation-delay: -1.0s;
	}
}

@keyframes loader-08 {
	0%,
	100% {
		transform: scale(0.0);
	}
	50% {
		transform: scale(1.0);
	}
}

///////////////////////////////////////////////////
.loader-09 {
	background-color: currentcolor;
	border-radius: 50%;
	animation: loader-09 1.0s infinite ease-in-out;
}

@keyframes loader-09 {
	0% {
		transform: scale(0);
	}
	100% {
		transform: scale(1.0);
		opacity: 0;
	}
}

/////////////////////////////////////////////////
.loader-10 {
	position: relative;
	animation: loader-10-1 2.0s infinite linear;
	&:before,
	&:after {
		content: '';
		width: 0;
		height: 0;
		border: .5em solid currentcolor;
		display: block;
		position: absolute;
		border-radius: 100%;
		animation: loader-10-2 2s infinite ease-in-out;
	}
	&:before {
		top: 0;
		left: 50%;
	}
	&:after {
		bottom: 0;
		right: 50%;
		animation-delay: -1s;
	}
}

@keyframes loader-10-1 {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes loader-10-2 {
	0%,
	100% {
		transform: scale(0);
	}
	50% {
		transform: scale(1);
	}
}

////////////////////////////////////////////////
.loader-11 {
	background-color: currentcolor;
	animation: loader-11 1.2s infinite ease-in-out;
}

@keyframes loader-11 {
	0% {
		transform: perspective(120px) rotateX(0deg) rotateY(0deg);
	}
	50% {
		transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
	}
	100% {
		transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
	}
}

////////////////////////////////////////////////
.loader-12 {
	position: relative;
	&:before,
	&:after {
		content: '';
		display: block;
		position: absolute;
		background-color: currentcolor;
		left: 50%;
		right: 0;
		top: 0;
		bottom: 50%;
		box-shadow: -.5em 0 0 currentcolor;
		animation: loader-12 1s linear infinite;
	}
	&:after {
		top: 50%;
		bottom: 0;
		animation-delay: .25s;
	}
}

@keyframes loader-12 {
	0%,
	100% {
		box-shadow: -.5em 0 0 transparent;
		background-color: currentcolor;
	}
	50% {
		box-shadow: -.5em 0 0 currentcolor;
		background-color: transparent;
	}
}

/////////////////////////////////////////////////
.loader-13:before,
.loader-13:after,
.loader-13 {
	border-radius: 50%;
	animation-fill-mode: both;
	animation: loader-13 1.8s infinite ease-in-out;
}

.loader-13 {
	color: currentcolor;
	position: relative;
	transform: translateZ(0);
	animation-delay: -0.16s;
	top: -1em;
	&:before {
		right: 100%;
		animation-delay: -0.32s;
	}
	&:after {
		left: 100%;
	}
	&:before,
	&:after {
		content: '';
		display: block;
		position: absolute;
		top: 0;
		width: inherit;
		height: inherit;
	}
}

@keyframes loader-13 {
	0%,
	80%,
	100% {
		box-shadow: 0 1em 0 -1em;
	}
	40% {
		box-shadow: 0 1em 0 -.2em;
	}
}

//////////////////////////////////////////////////////////
.loader-14 {
	border-radius: 50%;
	box-shadow: 0 1em 0 -.2em currentcolor;
	position: relative;
	animation: loader-14 0.8s ease-in-out alternate infinite;
	animation-delay: 0.32s;
	top: -1em;
	&:after,
	&:before {
		content: '';
		position: absolute;
		width: inherit;
		height: inherit;
		border-radius: inherit;
		box-shadow: inherit;
		animation: inherit;
	}
	&:before {
		left: -1em;
		animation-delay: 0.48s;
	}
	&:after {
		right: -1em;
		animation-delay: 0.16s;
	}
}

@keyframes loader-14 {
	0% {
		box-shadow: 0 2em 0 -.2em currentcolor;
	}
	100% {
		box-shadow: 0 1em 0 -.2em currentcolor;
	}
}

////////////////////////////////////////////
.loader-15 {
	background: currentcolor;
	position: relative;
	animation: loader-15 1s ease-in-out infinite;
	animation-delay: 0.4s;
	width: .25em;
	height: .5em;
	margin: 0 .5em;
	&:after,
	&:before {
		content: '';
		position: absolute;
		width: inherit;
		height: inherit;
		background: inherit;
		animation: inherit;
	}
	&:before {
		right: .5em;
		animation-delay: 0.2s;
	}
	&:after {
		left: .5em;
		animation-delay: 0.6s;
	}
}

@keyframes loader-15 {
	0%,
	100% {
		box-shadow: 0 0 0 currentcolor, 0 0 0 currentcolor;
	}
	50% {
		box-shadow: 0 -.25em 0 currentcolor, 0 .25em 0 currentcolor;
	}
}

////////////////////////////////////////////
.loader-16 {
	transform: rotateZ(45deg);
	perspective: 1000px;
	border-radius: 50%;
	&:before,
	&:after {
		content: '';
		display: block;
		position: absolute;
		top: 0;
		left: 0;
		width: inherit;
		height: inherit;
		border-radius: 50%;
		animation: 1s spin linear infinite;
	}
	&:before {
		transform: rotateX(70deg);
	}
	&:after {
		transform: rotateY(70deg);
		animation-delay: .4s;
	}
}

@keyframes rotate {
	0% {
		transform: translate(-50%, -50%) rotateZ(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotateZ(360deg);
	}
}

@keyframes rotateccw {
	0% {
		transform: translate(-50%, -50%) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(-360deg);
	}
}

@keyframes spin {
	0%,
	100% {
		box-shadow: .2em 0px 0 0px currentcolor;
	}
	12% {
		box-shadow: .2em .2em 0 0 currentcolor;
	}
	25% {
		box-shadow: 0 .2em 0 0px currentcolor;
	}
	37% {
		box-shadow: -.2em .2em 0 0 currentcolor;
	}
	50% {
		box-shadow: -.2em 0 0 0 currentcolor;
	}
	62% {
		box-shadow: -.2em -.2em 0 0 currentcolor;
	}
	75% {
		box-shadow: 0px -.2em 0 0 currentcolor;
	}
	87% {
		box-shadow: .2em -.2em 0 0 currentcolor;
	}
}

//////////////////////////////////
.loader-17 {
	position: relative;
	background-color: currentcolor;
	border-radius: 50%;
	&:after,
	&:before {
		content: "";
		position: absolute;
		width: .25em;
		height: .25em;
		border-radius: 50%;
		opacity: .8;
	}
	&:after {
		left: -.5em;
		top: -.25em;
		background-color: currentcolor;
		transform-origin: .75em 1em;
		animation: loader-17 1s linear infinite;
		opacity: .6;
	}
	&:before {
		left: -1.25em;
		top: -.75em;
		background-color: currentcolor;
		transform-origin: 1.5em 1em;
		animation: loader-17 2s linear infinite;
	}
}

@keyframes loader-17 {
	0% {
		transform: rotateZ(0deg) translate3d(0, 0, 0);
	}
	100% {
		transform: rotateZ(360deg) translate3d(0, 0, 0);
	}
}

//////////////////////////////////
.loader-18 {
	position: relative;
	&:before,
	&:after {
		content: '';
		display: block;
		position: absolute;
		border-radius: 50%;
		border: .1em solid transparent;
		border-bottom-color: currentcolor;
		top: 0;
		left: 0;
		animation: 1s loader-18 linear infinite;
	}
	&:before {
		width: 1em;
		height: 1em;
	}
	&:after {
		width: .8em;
		height: .8em;
		top: .1em;
		left: .1em;
		animation-direction: reverse;
	}
}

@keyframes loader-18 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/////////////////////////////////////////
.loader-19 {
	border-top: .2em solid currentcolor;
	border-right: .2em solid transparent;
	animation: loader-19 1s linear infinite;
	border-radius: 100%;
	position: relative;
}

@keyframes loader-19 {
	to {
		transform: rotate(360deg);
	}
}

////////////////////////////////////////
.loader-20 {
	background-color: transparent;
	box-shadow: inset 0px 0px 0px .1em currentcolor;
	border-radius: 50%;
	position: relative;
	&:after,
	&:before {
		position: absolute;
		content: "";
		background-color: currentcolor;
		top: .5em;
		left: .5em;
		height: .1em;
		transform-origin: left center;
	}
	&:after {
		width: .4em;
		animation: loader-20 2s linear infinite;
	}
	&:before {
		width: .3em;
		animation: loader-20 8s linear infinite;
	}
}

@keyframes loader-20 {
	0% {
		transform: rotate(0deg)
	}
	100% {
		transform: rotate(360deg)
	}
}

////////////////////////////////////////
.loader-21 {
	position: relative;
	&:before,
	&:after {
		position: absolute;
		content: "";
	}
	&:before {
		width: 80%;
		height: 80%;
		left: 10%;
		bottom: 10%;
		border-radius: 100% 100% 100% 0;
		box-shadow: 0px 0px 0px .1em currentcolor;
		animation: loader-21 1s linear infinite;
		transform: rotate(-46deg);
	}
	&:after {
		width: 1em;
		height: .3em;
		border-radius: 100%;
		left: 0;
		background-color: rgba(255, 255, 255, 0.2);
		bottom: -.2em;
		z-index: -1;
	}
}

@keyframes loader-21 {
	0% {
		top: 0;
	}
	50% {
		top: -5px;
	}
	100% {
		top: 0;
	}
}

////////////////////////////////////////////////
.loader-22 {
	border: .1em currentcolor solid;
	border-radius: 100%;
	position: relative;
	overflow: hidden;
	z-index: 1;
	&:after,
	&:before {
		position: absolute;
		content: "";
		background-color: currentcolor;
	}
	&:after {
		width: 50%;
		height: .1em;
		left: 50%;
		top: 50%;
		transform-origin: left center;
		animation: loader-22 2s linear infinite alternate;
	}
	&:before {
		width: 100%;
		height: 40%;
		left: 0;
		bottom: 0;
	}
}

@keyframes loader-22 {
	0% {
		transform: rotate(-160deg);
	}
	100% {
		transform: rotate(-20deg);
	}
}

/////////////////////////////////////////////
.loader-23 {
	height: .5em;
	border: .1em currentcolor solid;
	border-radius: .1em;
	position: relative;
	animation: loader-23 5s linear infinite;
	&:after {
		width: .07em;
		height: 100%;
		background-color: currentcolor;
		border-radius: 0px .5em .5em 0px;
		position: absolute;
		content: "";
		top: 0;
		left: calc(100% + .1em);
	}
}

@keyframes loader-23 {
	0% {
		box-shadow: inset 0px 0px 0px currentcolor;
	}
	100% {
		box-shadow: inset 1em 0px 0px currentcolor;
	}
}

/////////////////////////////////////////////
.loader-24 {
	width: .8em;
	height: 1em;
	border: .1em currentcolor solid;
	border-radius: 0px 0px .2em .2em;
	position: relative;
	&:after,
	&:before {
		position: absolute;
		content: "";
	}
	&:after {
		width: .2em;
		height: 50%;
		border: .1em currentcolor solid;
		border-left: none;
		border-radius: 0px .5em .5em 0px;
		left: calc(100% + .1em);
		top: .1em;
	}
	&:before {
		width: .1em;
		height: .3em;
		background-color: currentcolor;
		top: -.3em;
		left: .05em;
		box-shadow: .2em 0px 0px 0px currentcolor, .2em -.2em 0px 0px currentcolor, .4em 0px 0px 0px currentcolor;
		animation: loader-24 1s linear infinite alternate;
	}
}

@keyframes loader-24 {
	0% {
		height: 0px
	}
	100% {
		height: 6px;
	}
}

////////////////////////////////////////
.loader-25 {
	border: .1em currentcolor solid;
	position: relative;
	animation: loader-25-1 5s linear infinite;
	&:after {
		width: .2em;
		height: .2em;
		position: absolute;
		content: "";
		background-color: currentcolor;
		bottom: calc(100% + .2em);
		left: -.4em;
		animation: loader-25-2 1s ease-in-out infinite;
	}
}

@keyframes loader-25-1 {
	0% {
		box-shadow: inset 0 0 0 0 currentcolor;
	}
	100% {
		box-shadow: inset 0 -1em 0 0 currentcolor;
	}
}

@keyframes loader-25-2 {
	25% {
		left: calc(100% + .2em);
		bottom: calc(100% + .2em);
	}
	50% {
		left: calc(100% + .2em);
		bottom: -.4em;
	}
	75% {
		left: -.4em;
		bottom: -.4em;
	}
	100% {
		left: -.4em;
		bottom: calc(100% + .2em);
	}
}

////////////////////////////////////////////
.loader-26 {
	width: .5em;
	height: .5em;
	background-color: currentcolor;
	box-shadow: 1em 0px 0px currentcolor;
	border-radius: 50%;
	animation: loader-26 1s ease-in-out infinite alternate;
}

@keyframes loader-26 {
	0% {
		opacity: 0.1;
		transform: rotate(0deg) scale(0.5);
	}
	100% {
		opacity: 1;
		transform: rotate(360deg) scale(1.2);
	}
}

//////////////////////////////////////////////
.loader-27 {
	box-shadow: inset 0 0 0 .1em currentcolor;
	border-radius: 50%;
	position: relative;
	margin-left: 1.2em;
	&:before {
		content: '';
		display: block;
		width: inherit;
		height: inherit;
		border-radius: 50%;
		position: absolute;
		right: 1.2em;
		top: 0;
		box-shadow: inset 0 0 0 .1em currentcolor;
	}
	&:after {
		border: .2em solid currentcolor;
		box-shadow: -1.2em 0 0 0 currentcolor;
		width: 0;
		height: 0;
		border-radius: 50%;
		left: 50%;
		top: 25%;
		position: absolute;
		content: "";
		animation: loader-27 2s linear infinite alternate;
	}
}

@keyframes loader-27 {
	0% {
		left: 0;
	}
	100% {
		left: .5em;
	}
}

/////////////////////////////////////////////////
.loader-28 {
	position: relative;
	animation: 2s loader-28-1 infinite;
	&:before {
		content: '';
		display: block;
		width: inherit;
		height: inherit;
		border-radius: 80% 20%;
		border: .1em solid currentcolor;
		transform: rotate(45deg);
		border-width: .1em .05em .05em .1em;
	}
	&:after {
		content: '';
		display: block;
		width: .2em;
		height: .2em;
		position: absolute;
		top: .4em;
		left: 50%;
		border-radius: 50%;
		box-shadow: -.07em .07em 0 .1em currentcolor;
		animation: 2s loader-28-2 linear infinite;
	}
}

@keyframes loader-28-1 {
	0%,
	100% {
		transform: scaleY(1);
	}
	10% {
		transform: scaleY(0);
	}
	20% {
		transform: scaleY(1);
	}
}

@keyframes loader-28-2 {
	0%,
	100% {
		transform: translateX(0);
	}
	30% {
		transform: translateX(-100%);
	}
	50% {
		transform: transalteX(200%);
	}
}

/////////////////////////////////////////
.loader-29 {
	border-radius: 50%;
	box-shadow: inset 0 0 0 .1em currentcolor, -.5em -.5em 0 -.4em currentcolor, 0 -.7em 0 -.4em currentcolor, .5em -.5em 0 -.4em currentcolor, -.5em .5em 0 -.4em currentcolor, 0 .7em 0 -.4em currentcolor, .5em .5em 0 -.4em currentcolor, -.7em 0 0 -.4em currentcolor, .7em 0 0 -.4em currentcolor;
	animation: 5s loader-29 linear infinite;
}

@keyframes loader-29 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

///////////////////////////////////////
.loader-30 {
	border: .2em solid transparent;
	border-top-color: currentcolor;
	border-bottom-color: currentcolor;
	border-radius: 50%;
	position: relative;
	animation: 1s loader-30 linear infinite;
	&:before,
	&:after {
		content: '';
		display: block;
		width: 0;
		height: 0;
		position: absolute;
		border: .2em solid transparent;
		border-bottom-color: currentcolor;
	}
	&:before {
		transform: rotate(135deg);
		right: -.3em;
		top: -.05em;
	}
	&:after {
		transform: rotate(-45deg);
		left: -.3em;
		bottom: -.05em;
	}
}

@keyframes loader-30 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

//////////////////////////////////////
.loader-31 {
	box-shadow: 0 0 2em currentcolor;
	background-color: currentcolor;
	position: relative;
	border-radius: 50%;
	transform: rotateX(-60deg) perspective(1000px);
	&:before,
	&:after {
		content: '';
		display: block;
		position: absolute;
		top: 0;
		left: 0;
		width: inherit;
		height: inherit;
		border-radius: inherit;
		animation: 1s loader-31 ease-out infinite;
	}
	&:after {
		animation-delay: .4s;
	}
}

@keyframes loader-31 {
	0% {
		opacity: 1;
		transform: rotate(0deg);
		box-shadow: 0 0 0 -.5em currentcolor, 0 0 0 -.5em currentcolor, 0 0 0 -.5em currentcolor, 0 0 0 -.5em currentcolor, 0 0 0 -.5em currentcolor, 0 0 0 -.5em currentcolor, 0 0 0 -.5em currentcolor, 0 0 0 -.5em currentcolor;
	}
	100% {
		opacity: 0;
		transform: rotate(180deg);
		box-shadow: -1em -1em 0 -.35em currentcolor, 0 -1.5em 0 -.35em currentcolor, 1em -1em 0 -.35em currentcolor, -1.5em 0 0 -.35em currentcolor, 1.5em -0 0 -.35em currentcolor, -1em 1em 0 -.35em currentcolor, 0 1.5em 0 -.35em currentcolor, 1em 1em 0 -.35em currentcolor;
	}
}

/////////////////////////////////////////////////
.loader-32 {
	position: relative;
	border-radius: 50%;
	box-shadow: 0 0 1em 0 currentcolor, inset 0 0 1em 0 currentcolor;
	animation: 1s loader-32 linear infinite;
	&:before,
	&:after {
		content: '';
		display: block;
		width: inherit;
		height: inherit;
		position: absolute;
		border-radius: 50%;
	}
	&:before {
		border-top: .2em solid currentcolor;
		border-right: .2em solid transparent;
		top: .28em;
		right: calc(50% - .22em);
	}
	&:after {
		border-bottom: .2em solid currentcolor;
		border-left: .2em solid transparent;
		bottom: .28em;
		left: calc(50% - .22em);
	}
}

@keyframes loader-32 {
	0% {
		transform: rotateX(-60deg) rotateZ(0deg);
	}
	100% {
		transform: rotateX(-60deg) rotateZ(360deg);
	}
}

////////////////////////////////////////////////
.loader-33 {
	border-radius: 50%;
	position: relative;
	//width: 180px;
	//height: 180px;
	&:after,
	&:before {
		position: absolute;
		content: "";
	}
	&:after {
		height: 0.1em;
		width: 1em;
		background-color: currentcolor;
		border-radius: 0.1em;
		bottom: 0;
		left: 0;
		transform-origin: bottom center;
		animation: loader-33-1 0.8s ease-in-out infinite alternate;
	}
	&:before {
		height: .2em;
		width: .2em;
		background-color: currentcolor;
		border-radius: 50%;
		top: 0;
		left: calc(50% - .1em);
		animation: loader-33-2 0.4s ease-in-out infinite alternate;
	}
}

@keyframes loader-33-2 {
	0% {
		height: .24em;
		transform: translateY(0px);
	}
	75% {
		height: .2em;
		width: .2em;
	}
	100% {
		height: .1em;
		width: .24em;
		transform: translateY(.8em);
	}
}

@keyframes loader-33-1 {
	0% {
		transform: rotate(-45deg);
	}
	100% {
		transform: rotate(45deg);
	}
}

//////////////////////////////////////////////////
.loader-34 {
	position: relative;
	width: 1em;
	height: .5em;
	&:after,
	&:before {
		position: absolute;
		content: "";
		height: .4em;
		width: .4em;
		top: 0;
		background-color: currentcolor;
		border-radius: 50%;
	}
	&:after {
		right: 0;
		animation: loader-34-2 0.5s ease-in-out infinite;
		animation-direction: alternate;
	}
	&:before {
		left: 0;
		animation: loader-34-1 0.5s ease-in-out infinite;
		animation-direction: alternate;
	}
}

@keyframes loader-34-1 {
	0% {
		transform: translatex(0px);
	}
	65% {
		height: .4em;
		width: .4em;
	}
	100% {
		height: .5em;
		width: .3em;
		transform: translatex(.2em);
	}
}

@keyframes loader-34-2 {
	0% {
		transform: translatex(0px);
	}
	65% {
		height: .4em;
		width: .4em;
	}
	100% {
		height: .5em;
		width: .3em;
		transform: translatex(-.2em);
	}
}

///////////////////////////////////////////
.loader-35 {
	margin: 0 .5em;
	position: relative;
	&:before {
		border-radius: 50%;
		background-color: currentcolor;
		animation: loader-35 3s cubic-bezier(0.77, 0, 0.175, 1) infinite;
		content: '';
		width: inherit;
		height: inherit;
		top: 0;
		left: 0;
		position: absolute;
	}
}

@keyframes loader-35 {
	0% {
		transform: translateX(0) scale(1)
	}
	25% {
		transform: translateX(-100%) scale(0.3)
	}
	50% {
		transform: translateX(0) scale(1)
	}
	75% {
		transform: translateX(100%) scale(0.3)
	}
	100% {
		transform: translateX(0) scale(1)
	}
}

///////////////////////////////////////////////
.loader-36 {
	position: relative;
	&:before,
	&:after {
		content: '';
		position: absolute;
		top: 0;
		left: 0;
	}
	&:before {
		width: 1em;
		height: 1em;
		border: .1em solid currentcolor;
		border-radius: 50%;
		animation: loader-36-1 1.15s infinite -0.3s;
	}
	&:after {
		right: 0;
		bottom: 0;
		margin: auto;
		width: 0;
		height: 0;
		border: .1em solid currentcolor;
		border-radius: 50%;
		transform: translate(-.2em);
		animation: loader-36-2 4.6s infinite steps(1);
	}
}

@keyframes loader-36-1 {
	to {
		transform: rotateX(180deg);
	}
}

@keyframes loader-36-2 {
	0% {
		opacity: 0;
	}
	25% {
		opacity: 1;
	}
	50% {
		box-shadow: .2em 0 0 currentcolor;
	}
	75% {
		box-shadow: .2em 0 0 currentcolor, .4em 0 0 currentcolor;
	}
}

////////////////////////////////////////////
.loader-37 {
	border-right: .1em solid currentcolor;
	border-radius: 100%;
	animation: loader-37 800ms linear infinite;
	&:before,
	&:after {
		content: '';
		width: .8em;
		height: .8em;
		display: block;
		position: absolute;
		top: calc(50% - .4em);
		left: calc(50% - .4em);
		border-left: .08em solid currentcolor;
		border-radius: 100%;
		animation: loader-37 400ms linear infinite reverse;
	}
	&:after {
		width: .6em;
		height: .6em;
		top: calc(50% - .3em);
		left: calc(50% - .3em);
		border: 0;
		border-right: .05em solid currentcolor;
		animation: none;
	}
}

@keyframes loader-37 {
	from {
		transform: rotate(360deg);
	}
	to {
		transform: rotate(0deg);
	}
}

//////////////////////////////////////////////////////////
.loader-38 {
	height: 0.1em;
	width: 0.1em;
	box-shadow: -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor;
	animation: loader-38 6s infinite;
}

@keyframes loader-38 {
	0% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor;
	}
	8.33% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor;
	}
	16.66% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor;
	}
	24.99% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor;
	}
	33.32% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor;
	}
	41.65% {
		box-shadow: 0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor;
	}
	49.98% {
		box-shadow: 0.2em 0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor;
	}
	58.31% {
		box-shadow: -0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor;
	}
	66.64% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor;
	}
	74.97% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, 0.2em -0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor;
	}
	83.3% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, 0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor;
	}
	91.63% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor, -0.2em 0.2em 0 0.1em currentcolor;
	}
	100% {
		box-shadow: -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor, -0.2em -0.2em 0 0.1em currentcolor;
	}
}
///////////////////////////////////////////////////////////
.loader-39 {
  position: relative;
  width: .15em;
  height: .15em;
  background-color: currentcolor;
  border-radius: 100%;
  animation: loader-39-1 30s infinite linear;
	&:before, &:after {
		content: '';
		border-radius: 100%;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
	&:before {
		width: .3em;
		height: 1em;
		animation: loader-39-2 .8s linear infinite;
	}
	&:after {
		width: 1em;
		height: .3em;
		animation: loader-39-2 1.2s linear infinite;
	}
}
@keyframes loader-39-1 {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
@keyframes loader-39-2 {
  0% {
    box-shadow: 0.04em -0.04em 0 0.02em currentcolor;
  }
  25% {
    box-shadow: 0.04em 0.04em 0 0.02em currentcolor;
  }
  50% {
    box-shadow: -0.04em 0.04em 0 0.02em currentcolor;
  }
  75% {
    box-shadow: -0.04em -0.04em 0 0.02em currentcolor;
  }
  100% {
    box-shadow: 0.04em -0.04em 0 0.02em currentcolor;
  }
}
//////////////////////
.loader-40 {
	border: .05em currentcolor solid;
	border-radius: .2em;
	overflow: hidden;
	position: relative;
	&:after, &:before {
		content: '';
		border-radius: 50%;
		position: absolute;
		width: inherit;
		height: inherit;
		animation: loader-40 2s infinite linear;
	}
	&:before {
		border-top: .2em currentcolor solid;
		top: -.15em;
		left: calc( -50% - .15em );
		transform-origin: right center;
	}
	&:after {
		border-bottom: .2em currentcolor solid;
		top: .15em;
		right: calc( -50% - .15em );
		transform-origin: left center;
	}
}
@keyframes loader-40 {
	from { transform: rotate(0deg); }
	to { transform: rotate(359deg); }
}
//////////////////////
.loader-41 {
	border: .05em currentcolor solid;
	border-radius: .2em;
	position: relative;
	background: linear-gradient(45deg, transparent 48%, currentcolor 50%, currentcolor 50%, transparent 52%, transparent),
				linear-gradient(-45deg, transparent 48%, currentcolor 50%, currentcolor 50%, transparent 52%, transparent);
	background-size: .5em .5em;
	background-position: 0% 0%;
	animation: loader-41 1s infinite linear;
}
@keyframes loader-41 {
	from { background-position: 0 0; }
	to { background-position: -1em 0; }
}

//////////////////////
.loader-42 {
	width: 2em;
	height: .66em;
	border: .05em currentcolor solid;
	border-radius: .1em;
	background: linear-gradient(-60deg, transparent 0%, transparent 50%, currentcolor 50%, currentcolor 75%, transparent 75%, transparent);
	background-size: 1em 2em;
	background-position: 0 0;
	animation: loader-42 0.8s infinite linear;
}
@keyframes loader-42 {
	from { background-position: 0 0; }
	to { background-position: -2em 0; }
}

//////////////////////


//////////////////////
.box:nth-of-type(n + 43){
	display:none;
}
            
          
!
            
              /*
All loaders here need to meet following requirements:
- their size must depend on the font-size of their parent;
- they must only use the color of their parent;
- they must be single elements with no children elments;
*/



$('button').on('click', function(){
	var number = getRandomInt(1, 40);
	if (number < 10) {number = '0'+ number;}
	$(this).html('<div class="loader-' + number + '"></div> Loading...');
	console.log('Resize window to change size and color of the button');
});

function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;
}

$(window).resize(function() {
	$('button').css('color', 'hsl(' + Math.floor((window.innerWidth / 360)*100)  + ', 70%, 70%)');
});
            
          
!
999px
Loading ..................

Console