Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                -var n = "<br>";
//- h1 2 de noviembre!{n}Día de muertos

div.main
    div.l
        div.camisa.l--camisa
        div.cuello.l--cuello
        //-======================
        div.cabeza.l--cabeza
            div.cabello
            //-======================
            div.cejas
                div.ceja
                div.ceja
            //-======================
            div.ojos.l--ojos
                div.ojo.l--ojo
                div.ojo.l--ojo
            //-======================    
            div.l--nariz
            //-======================
            div.barba.l--barba
                div.boca.l--boca
                    div.dientes.l--dientes
                    div.dientes.l--dientes
                    div.l--lengua
            //-======================
            div.oreja.l--oreja
            div.l--copete
    
    //-======================
    div.x-ray
        div.r
            div.camisa.r--camisa
            div.cuello.r--cuello
            //-======================
            div.r--columna
                div.r--huesos
                div.r--huesos
                div.r--huesos
                div.r--huesos
                div.r--huesos
                div.r--huesos
            //-======================
            div.cabeza.r--cabeza
                div.ojos.l--ojos
                    div.ojo.r--ojo
                    div.ojo.r--ojo
                //-======================    
                div.r--nariz
                //-======================
                div.barba.r--barba
                    div.boca.r--boca
                        div.dientes.r--dientes
                        div.dientes.r--dientes
              
            
!

CSS

              
                /* Variables */
$bg-1: #a0a2b6;
$bg-2: #00455C;

$camisa-1: #009C9A;
$camisa-2: #009391;
$cuello-1: #FC9080;
$cuello-2: #FE7D7A;
$cara-1: #FFBF9E;
$cara-2: #F98D7D;
$barba-1: #FE3445;
$barba-2: #DA2B3A;

$boca: #002637;
$dientes: #FFFFFF;
$lengua: #FF0460;
$ojo: #010000;


/* Reset */
*, *::after, *::before {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	user-select: none;
}
/* Generic */
body{
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
	background-color: $bg-1;
	font-family: 'Griffy', cursive;
}
h1{
	position: absolute;
	top: 30px;
	left: 30px;
	font-family: 32px;
	letter-spacing: 2px;
	color: $dientes;
}
.main{
	display: flex;
	justify-content: center;
	align-items: flex-end;
	height: 600px;
	width: 800px;
	overflow: hidden;

}
/**/
.l{
	position: relative;
	width: 310px;
	height: 560px;
	animation: cuerpo .5s infinite linear alternate;

	&--lengua{
		position: absolute;
		bottom: 25px;
		width: 60%;
		height: 15px;
		border-top-right-radius: 15px;
		background-color: $lengua;
	}
	&--nariz{
		position: absolute;
		top: 125px;
		left: 50%;
		width: 60px;
		height: 60px;
		transform: translateX(-50%);
		border-radius: 50%;
		background-color: $cara-1;
		box-shadow: inset 0 -10px 0 $cara-2;
		z-index: 150;
	}
	&--copete{
		position: absolute;
		top: 0px;
		left: calc(50% - 65px);
		width: 220px;
		height: 100px;
		z-index: 200;
		border-bottom-left-radius: 80px;
		border-bottom-right-radius: 80px;
		background-color: $barba-1;
		box-shadow: inset 0 -30px 0 $barba-2;
	}
}

/* Generic Components*/
.camisa{
	position: absolute;
	bottom: -30px;
	left: 50%;
	transform: translateX(-50%);
	width: 240px;
	height: 100px;
	border: 5px solid $camisa-1;
	background-image:
		repeating-linear-gradient(
			to right,
			$camisa-1 0px,
			$camisa-1 5px,
			$camisa-2 5px,
			$camisa-2 15px
		);
}
.cuello{
	position: absolute;
	bottom: 70px;
	left: 50%;
	transform: translateX(-50%);
	width: 170px;
	height: 150px;
	background-image: linear-gradient(to top, $cuello-1 35%, $cuello-2 35%);
}
.cabeza{
	position: absolute;
	left: 50%;
	bottom: 145px;
	transform: translateX(-50%);
	width: 240px;
	height: 390px;
	border-radius: 120px;
	z-index: 100;
	background-color: $cara-1;
	animation: cabeza .5s infinite linear alternate;
}
.cabello{
	position: absolute;
	left: 50%;
	top: -15px;
	transform: translateX(-50%);
	width: 280px;
	height: 190px;

	background: $barba-1;
	border-top-left-radius: 150px;
	border-top-right-radius: 150px;
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
	box-shadow: inset 40px -40px 0 $barba-2;

	&:before{
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		height: 85%;
		width: 85%;
		background: $cara-1;
		transform: translate(-50%, -43%);
		border-top-left-radius: 120px;
		border-top-right-radius: 120px;
	}
}

	.ojos{
		display: flex;
		justify-content: space-between;
		position: absolute;
		left: 50%;
		top: 125px;
		transform: translateX(-50%);
		height: 22px;
		width: 100px;
	}
		.ojo{
			height:22px;
			width: 22px;
			border-radius: 50%;
			background-color: $ojo;
			animation: ojo infinite 2s;
		}
	.cejas{
		display: flex;
		justify-content: space-between;
		position: absolute;
		top: 100px;
		left: 50%;
		transform: translateX(-50%);
		width: 125px;
		height: 18px;
	}
		.ceja{
			height: 18px;
			width: 40px;
			border-radius: 25px;
			background-color: $barba-1;
			box-shadow: 0px 8px 0 $cara-2;
		}

	.barba{
		position: absolute;
		bottom: 0;
		width: 100%;
		height: 60%;
		background-color: $barba-2;
		border-bottom-left-radius: 120px;
		border-bottom-right-radius: 120px;
		&:before{
			content: '';
			position: absolute;
			top: 0;
			width: 100%;
			height: 70%;
			background: blue;
			border-bottom-left-radius: 50%;
			border-bottom-right-radius: 50%;
			background-color: $barba-1;
		}
	}
		.boca{
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			position: absolute;
			top: 35px;
			left: 50%;
			transform: translateX(-50%);
			width: 50%;
			height: 80px;
			border-bottom-left-radius: 30px;
			border-bottom-right-radius: 30px;
			background-color: $boca;
		}
			.dientes{
				width: 100%;
				height: 25px;
				background-color: $dientes;
				z-index: 50;
				&:nth-of-type(2){
					border-bottom-left-radius: 30px;
					border-bottom-right-radius: 30px;
				}
			}
.oreja{
	position: absolute;
	top: 140px;
	left: 50%;
	height: 50px;
	width: 320px;
	transform: translateX(-50%);
	border-radius: 50px;
	background-color: $cara-1;
	box-shadow: inset 0 -15px 0 $cara-2;
	z-index: -1;
}

.x-ray{
	position: absolute;
	right: 0;
	width: 50%;
	height: 100%;
	z-index: 500;
	overflow: hidden;
	background: $bg-2;

	&::before,
	&::after{
		content: '';
		position: absolute;
		top: 0%;
		left: -50%;
		width: 250%;
		height: 200px;
		background: rgba($dientes, .1);
		transform: rotateZ(-45deg);
		z-index: 2000;
		animation: reflejo .25s infinite;
	}
	&::after{
		top: 50%;
		width: 250%;
		height: 100px;
	}
}

.r{
	position: absolute;
	bottom: 0;
	left: 0%;
	z-index: 500;
	animation: cuerpo .5s infinite linear alternate;


	&--camisa{ background: $boca; border: none; }
	&--cuello{ background: $boca; border: none; }

	&--columna{
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		position: absolute;
		bottom: 0;
		width: 80px;
		height: 150px;
		z-index: 200;
		left: -40px;
		padding-top: 5px;
	}
	&--huesos{
		width: 80px;
		height: 18px;
		border-radius: 15px;
		background-color: darken($dientes, 20);
	}
	&--cabeza{
		border: none;
		background: $boca;

		&::before{
			content: '';
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%,-50%);
			height: 95%;
			width: 90%;
			background-image:
			linear-gradient(
			to bottom,
			darken($dientes, 20) 50%,
			$boca 50%,
			$boca 69%,
			darken($dientes, 20) 69%
			);

			border-radius: 120px;
		}
	}
	&--barba{
		background: none;
		&::before{ content: none; }
	}
	&--ojo{ background-color: $boca; }
	&--dientes{
		background-color: darken($dientes, 10);
		&:nth-of-type(2){
			border-bottom-left-radius: 0;
			border-bottom-right-radius: 0;
		}
	}
	&--nariz{
		position: absolute;
		top: 140px;
		left: 50%;
		width: 40px;
		height: 40px;
		transform: translateX(-50%);
		border-radius: 50%;
		background-color: $boca;
		z-index: 150;
	}
}
/**/
@keyframes cuerpo {
	0%{
		transform: rotateZ(-10deg);
		transform-origin: bottom center;
	}
	100%{
		transform: rotateZ(10deg);
		transform-origin: bottom center;
	}
}
@keyframes cabeza {
	0%{
		transform: translateX(-50%) rotateZ(-14deg);
		transform-origin: bottom center;
	}
	100%{
		transform: translateX(-50%) rotateZ(14deg);
		transform-origin: bottom center;
	}
}
@keyframes reflejo{
	0%{ width: 250%;}
	100%{ width: 249%;}
}
@keyframes ojo{
	0%,3%,100%{ height: 22px;}
	2%{ height: 2px;}
}

              
            
!

JS

              
                /*
Designed by: Gigantic
Original image: https://dribbble.com/shots/5629038-Flat-Design-Character-Illustration-in-After-Effects-CC-2019
*/
              
            
!
999px

Console