<div class="globe">
	<div class="bird">
		<div class="body">
	  	<div class="eye left"></div>
	  	<div class="eye right"></div>
	  	<div class="beak"><div></div></div>
	  	<div class="feet"></div>
	    <div class="wire"></div>
		</div>
		<div class="hills"></div>
		<div class="cloud"></div>
		<div class="cloud small"></div>
	</div>
</div>

<h2>Dozing Bird<br><span>based on <a href="https://dribbble.com/shots/2015903-Dozing-bird" target="_blank">dribbble</a> by  Colin Chang</span></h2>
$birdColor: #11e7d7;
$birdColor2: #31bfae;
$birdColor3: #01c7be;
$feetColor: #f8c14d;
$beakColor: #f7d35d;
$beakColor2: #eb9f2d;

$birdColor3: #01c7be;

// Storyboard Timeline
$timeline: (
 'begin'         : 0s,
 'eye-p0-1'      : 0.4s,
 'eye-p1-1'		   : 0.4s,
 'eye-p4-1'      : 1.8s,
 'eye-p3-1'      : 0.4s,
 'eye-p4-2'      : 1s,
 'eye-p2-1'      : 0.1s,
 'end'           : 0.4s
);


// $totaltime:						Total of all timecodes in $timeline
// $timelineAccumulated:	Accumulated timeline map based on $timeline
$totaltime: 0s;
$timelineAccumulated: ();
@each $key, $time in $timeline {
	$totaltime: $totaltime + $time;
	$timelineAccumulated: map-merge($timelineAccumulated, ($key : $totaltime) );
}

// Timecode to Percent function
// Params:
// 	$key:			key/position in timeline
// 	$offset:	optional offset to add to time from timeline (use negative number to subtract)
// Return: 		Percentage value of keyposition in timeline.
@function tp($key, $offset: 0s) {
	@return (map-get($timelineAccumulated, $key) + $offset) / $totaltime * 100%;
}


@keyframes eyes {
	#{tp('begin')},
	#{tp('eye-p0-1')},
  #{tp('end')} {
   	top: -50px;
	}
	#{tp('eye-p1-1')} {
   	top: -45px;
	}
	#{tp('eye-p2-1')} {
   	top: -20px;
	}
	#{tp('eye-p4-1')},
	#{tp('eye-p4-2')} {
   	top: -15px;
	}
	#{tp('eye-p3-1')} {
    top: -25px;
	}
}
@keyframes wings {
	#{tp('begin')},
	#{tp('eye-p4-2')},
  #{tp('end')} {
		top: 70px;
	}
	#{tp('eye-p2-1')} {
		top: 60px;
	}
}

@keyframes feet {
	#{tp('begin')},
	#{tp('eye-p4-2')},
  #{tp('end')} {
		top: -2px;
	}
	#{tp('eye-p2-1')} {
		top: 0px;
	}
}
@keyframes cloud {
	0% {
		left: -140px;
	}
	100% {
		left: 280px;
	}
}

@import url(https://fonts.googleapis.com/css?family=Fira+Sans:400,500italic);

html {
	height: 100%;
	background-color: rgba(34,32,36,1);
	background: radial-gradient(circle at center, rgba(71,65,76,1) 0%,rgba(34,32,36,1) 100%);
	background-repeat: no-repeat;
}
body {
 text-align: center;
 font: normal 100% 'Fira Sans', sans-serif;
}
h2 {
	font-size: 4vw;
	span {
		font-size: 60%;
	}
}
a {
	color: #aaa;
}



.globe {
	margin: 1em 0 0 0;
	position: relative;
	display: inline-block;
	text-align: left;
	width: 400px;
	height: 400px;
	border-radius: 50%;
	border: 20px solid #f7dbcf;
	box-sizing: border-box;
	background: linear-gradient(to bottom, rgba(134,174,204,1) 0%,rgba(212,228,239,1) 100%);
	overflow: hidden;
	box-shadow: inset 0 0 80px rgba(0,0,0,.5),
										0 0 20px rgba(0,0,0,.3);
	&:before, &:after {
		position: absolute;
		content: "";
 		box-sizing: border-box;
		border-radius: 50%;
		z-index: 10;
	}
	&:before {
		height: 94%;
		width: 94%;
		top:3%;
		right: 3%;
		border: 10px solid transparent;
		border-right-color: rgba(255,255,255,.3);
		border-right-width: 10px;
		border-right-style: solid;

	}
	&:after {
		top: 50px;
		right: 65px;
		width: 10px;
		height: 10px;
		background: rgba(255,255,255,.3);
  }
	.bird {
		position: absolute;
		z-index: 1;
		left: 96px;
		top: 100px;
		.body {
			position: absolute;
			width: 175px;
			height: 186px;
			border-radius: 50%;
			background-clip: padding-box;
			background-color: $birdColor;
			box-shadow: inset 0 0 80px rgba(0,0,0,.3);
			&:before, &:after {
				position: absolute;
				content: "";
				z-index: -1;
				width: 26px;
				height: 93px;
				border-radius: 50%;
				background-color: $birdColor;
				box-shadow: inset 0 0 13px rgba(0,0,0,.3);
				top: 70px;
				animation: wings $totaltime linear infinite;
			}
			&:before {
				left: 0;
			}
			&:after {
				right: 0;
		  }
			.eye {
				position: absolute;
				z-index: 1;
				overflow: hidden;
				width: 56px;
				height: 56px;
				top:28px;
				border-radius: 50%;
				background-color: #fff;
				border: 1px solid $birdColor3;
				box-shadow: inset 0 0 0 1px $birdColor3;
				&:before, &:after {
					position: absolute;
					content: "";
				}
				&:before {
					width: 18px;
					height: 18px;
					border-radius: 50%;
					background-color: #000;
					top: 30px;
				}
				&:after {
					width: 200px;
					height: 200px;
					background: radial-gradient(ellipse at center,
					rgba(109,0,25,0) 0%,
					rgba(130,1,31,0) 35%,
					$birdColor3 36%,
					$birdColor2 100%);
					animation: eyes $totaltime linear infinite;
				}
				&.left {
					left: 15px;
					&:before {
						left: 20px;
					}
					&:after {
		 				left: -60px;
		    		top: -45px;
					}
				}
				&.right {
					right: 15px;
					&:before {
						right: 20px;
					}
					&:after {
		 				right: -60px;
		    		top: -45px;
					}
				}
			}
			.beak {
				position: absolute;
				z-index: 1;
				width: 41px;
				height: 55px;
				top: 70px;
				left: 67px;
				border-radius: 50%;
				background-color: $birdColor2;
				&:before {
						position: absolute;
						content: "";
						width: inherit;
						height: inherit;
						top: 2px;
						border-radius: 50%;
						background: $beakColor2;
				}
				&:after {
						position: absolute;
						content: "";
						z-index: -1;
						width: 37px;
						height: inherit;
						top: 12px;
						left: 2px;
						border-radius: 50%;
						background: $birdColor2;
				}
				div {
					position: absolute;
					width: 43px;
					height: 43px;
					top: -1px;
					left: -1px;
					border-radius: 50% 60% 50%  40%;
					background-clip: padding-box;
					background-color: $beakColor;
					transform: rotate(-45deg);
					&:before {
						position: absolute;
						content: "";
						transform: rotate(45deg);
						width: 17px;
						height: 8px;
						top: 10px;
						left: 20px;
						border-radius: 50%;
						background-color: #fff;
					}
				}
			}
			.feet {
				position: absolute;
				bottom: 15px;
				width: 100%;
				&:before, &:after {
					position: absolute;
					content: "";
					width: 27px;
					height: 21px;
					border-radius: 50%;
					background-color: $feetColor;
					box-shadow: inset 0 0 12px rgba(0,0,0,.2);
					animation: feet $totaltime linear infinite;
				}
				&:before {
					left: 40px;
				}
				&:after {
					right: 40px;
				}
			}
		}
	}
	.wire {
		position: absolute;
		z-index: -1;
		width: 500px;
		height: 400px;
		left: -173px;
		top: -215px;
		border-radius: 50%;
		border: 3px solid transparent;
		border-bottom-color: black;
	}
	.hills {
		position: absolute;
		width: 60px;
		height: 60px;
		border-radius: 30%;
		top: 230px;
		left: 60px;
		transform: rotate(45deg);
		background: radial-gradient(ellipse at top left, rgba(170,217,93,1) 0%,rgba(187,195,105,1) 100%);
		box-shadow: inset 5px 0 12px rgba(0,0,0,.2);
		&:before, &:after {
			position: absolute;
			content: "";
			width: 178px;
			height: 90px;
			border-radius: 50%;
			background: inherit;
			box-shadow: inherit;
		}
		&:before {
			left: -90px;
			top: 30px;
			z-index: -1;
			transform: rotate(-20deg);
		}
		&:after {
			left: 0px;
			top: -55px;
			transform: rotate(120deg);
		}
	}

	.cloud {
		position: absolute;
		width: 70px;
		height: 24px;
		background: linear-gradient(to bottom,
								rgba(242,249,254,1) 5%,
								rgba(214,240,253,1) 100%);
		border-radius: 20px;
		top:-20px;
		z-index: -1;
		animation: cloud $totaltime*2 linear infinite;
		&.small {
			top:-50px;
			transform: scale(.6);
			animation-delay: -$totaltime/3;
			animation-duration: $totaltime*3;
		}
		&:before, &:after {
			position: absolute;
			content: "";
			background: inherit;
			z-index: -1;
		}
		&:before {
			width: 36px;
			height: 36px;
			top: -18px;
			right: 10px;
			border-radius: 40px;
		}
		&:after {
			width: 20px;
			height: 20px;
			top: -10px;
			left: 10px;
			border-radius: 20px;
		}
	}
}
View Compiled
/*
Dozing Bird
based on dribbble by Colin Chang
https://dribbble.com/shots/2015903-Dozing-bird
*/
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js