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.

            
              .box
	.head
		.eye1
		.eye2
		.hair
		.nose
	.cape
	.body
		.diamond1
		.diamond2
		.s s
	.shadow
	
            
          
!
            
              body {
  background: #25ACB4;
}

.box {
  position: relative;
  margin: auto;
  display: block;
  margin-top: 8%;
  width: 600px;
  height: 420px;
  background: none;
	
		.head {
			background: #FCDBA5;
			width: 180px;
			height: 150px;
			position: absolute;
			border-radius: 5%;
			top: 10%;
			left: 40%;
			animation-name: float1;
			-webkit-animation-name: float1;

			animation-duration: 4s;   
			-webkit-animation-duration: 4s;

			animation-iteration-count: infinite;
			-webkit-animation-iteration-count: infinite;


			.eye1 {
				background: #FFF;
				border-radius: 50%;
				width: 50px;
				height: 50px;
				top: 30%;
				left: 15%;
				position: absolute;
					&:before {
						background: #000;
						content: '';
						width: 35px;
						height: 35px;
						border-radius: 50%;
						top: 20%;
						left: 20%;
						position: absolute;
					}
				&:after {
					content: '';
					position: absolute;
					width: 15px;
					height: 15px;
					background: #FFF;
					border-radius: 50%;
					top: 30%;
					left: 50%;		
				}
			}

				.eye2 {
				background: #FFF;
				border-radius: 50%;
				width: 50px;
				height: 50px;
				top: 30%;
				right: 15%;
				position: absolute;
					&:before {
						background: #000;
						content: '';
						width: 35px;
						height: 35px;
						border-radius: 50%;
						top: 20%;
						left: 20%;
						position: absolute;
					}
				&:after {
					content: '';
					position: absolute;
					width: 15px;
					height: 15px;
					background: #FFF;
					border-radius: 50%;
					top: 30%;
					left: 50%;		
				}
			}

			.nose {
				background: #E3BF85;
				position: absolute;
				top: 55%;
				left: 40%;
				width: 35px;
				height: 20px;
				border-radius: 50%;
			}

			.hair {
				background: #000;
				position: absolute;
				width: 100%;
				height: 25%;
			}
		}
		.cape {
			border-bottom: 200px solid red;
			border-left: 50px solid transparent;
			border-right: 50px solid transparent;
			position: absolute;
			width: 200px;
			top: 47%;
			left: 29%;
			animation-name: float2;
			-webkit-animation-name: float2;

			animation-duration: 4s;   
			-webkit-animation-duration: 4s;

			animation-iteration-count: infinite;
			-webkit-animation-iteration-count: infinite;

		}

		.body {
			background: #4F67FF;
			width: 30%;
			height: 50%;
			position: absolute;
			top: 47%;
			left: 40%;
			animation-name: float2;
			-webkit-animation-name: float2;

			animation-duration: 4s;   
			-webkit-animation-duration: 4s;

			animation-iteration-count: infinite;
			-webkit-animation-iteration-count: infinite;

			.diamond1 {
				border-color: transparent transparent red transparent;
				border-style: solid;
				border-width: 0 45px 45px 45px;
				height: 0;
				width: 50px;
				position: relative;
				margin: 30px 0px 50px 15px;
				&:after {
					content: '';
					position: absolute;
					top: 45px;
					left: -45px;
					width: 0;
					height: 0;
					border-style: solid;
					border-color: red transparent transparent transparent;
					border-width: 80px 70px 0 70px;
				}	
			}
			.diamond2 {
				border-color: transparent transparent yellow transparent;
				border-style: solid;
				border-width: 0 35px 35px 35px;
				height: 0;
				width: 45px;
				position: absolute;
				margin: -85px 0px 50px 26px;
				&:after {
					content: '';
					position: absolute;
					top: 35px;
					left: -35px;
					width: 0;
					height: 0;
					border-style: solid;
					border-color: yellow transparent transparent transparent;
					border-width: 65px 55px 0 60px;
				}	
			}
			.s {
				font-size: 110pt;
				position: absolute;
				color: red;
				left: 22%;
				top: -14%;
				font-family: 'Cherry Cream Soda', cursive;
			}
	}

		.shadow {
			background: #353535;
			border-radius: 50%;
			width: 300px;
			height: 50px;
			top: 105%;
			position: absolute;
			left: 30%;
		}
	

}

@keyframes float1{
	0% {
		transform: translateY(0%);
	}
	50% {
		transform: translateY(-5%);
	}
	100% {
		transform: translateY(0%);
	}
}
@keyframes float2{
	0% {
		transform: translateY(0%);
	}
	50% {
		transform: translateY(-3%);
	}
	100% {
		transform: translateY(0%);
	}
}
            
          
!
999px
Loading ..................

Console