Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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

              
                <div class="wrap">
<h1>Real eye <em>with CSS</em> <strong>Sfumato</strong></h1>
<div class="eye"></div>
</div>
              
            
!

CSS

              
                body {background:hsl(30, 90%, 82%);}
.wrap {width:20em;margin:5em auto;position:relative;font-size:20px;cursor:pointer;}
h1 {
	color: hsla(30, 50%, 50%, 0.8);
	font-family: serif;
	font-size: 1em;
	width: 13em;
	left: 1em;
	top: 1em;
	white-space:nowrap;
    position: absolute;
	text-transform: uppercase;
	text-align: right;
	z-index: 20;
	text-shadow:
		-0.5em 0 0.2em hsla(30, 20%, 10%, 0.6),
		0 0 0.2em, 0 0 0.2em,
		0.2em 0.2em 0.3em,
		-0.2em 0.1em 0.1em;
	-webkit-transform: skewX(50deg) scale(1.6) rotateX(15deg) rotateY(-30deg) rotateZ(11deg) translate3d(-0.3em, -0.3em, 0em);
	-moz-transform: skewX(50deg) scale(1.6) rotateX(15deg) rotateY(-30deg) rotateZ(11deg) translate3d(-0.3em, -0.3em, 0em);
	transform: skewX(50deg) scale(1.6) rotateX(15deg) rotateY(-30deg) rotateZ(11deg) translate3d(-0.3em, -0.3em, 0em);
	-webkit-transition: 0.6s;
	-moz-transition: 0.6s;
	transition: 0.6s;
}
.wrap:hover h1,
.wrap:hover h1 * {
	text-shadow:none;
	position: static;
	text-transform: none;
	text-align: left;
	display:inline-block;
	font-style:normal;
	-webkit-transform: translate3d(0,0,0);
	-moz-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0);
}
h1 em {
	display: block;
	font-weight: normal;
	position: absolute;
	left: 0;
	top: 0;
	-webkit-transform: skewX(-75deg) skewY(-16deg) translate3d(2.6em, 0.9em, -0.2em) scale(0.9, 0.8) rotate(10deg);
	-moz-transform: skewX(-75deg) skewY(-16deg) translate3d(2.6em, 0.9em, -0.2em) scale(0.9, 0.8) rotate(10deg);
	transform: skewX(-75deg) skewY(-16deg) translate3d(2.6em, 0.9em, -0.2em) scale(0.9, 0.8) rotate(10deg);
}
h1 strong {
	display: block;
	font-weight: normal;
	position: absolute;
	right: 0;
	top: 0;
	-webkit-transform: skewX(-65deg) scale(0.4, 1.1) translate3d(6em, 0px, 0px);
	-moz-transform: skewX(-65deg) scale(0.4, 1.1) translate3d(6em, 0px, 0px);
	transform: skewX(-65deg) scale(0.4, 1.1) translate3d(6em, 0px, 0px);
}
.eye:before {
	color: hsl(240, 100%, 17%);
	content: "\30CE";
	font-size: 1.4em;
	display: block;
	font-family: serif;
	height: 1.3em;
	width: 50%;
	left: -0.1em;
	position: absolute;
	top: -0.4em;
	z-index: 15;
	text-shadow:
		4em 0 0,
		3.75em 0 0,
		3.5em 0 0,
		3.25em 0 0,
		3em 0 0,
		2.75em 0 0,
		2.5em 0 0,
		2.25em 0 0,
		2em 0 0,
		1.75em 0 0,
		1.5em 0 0,
		1.25em 0 0,
		1em 0 0,
		0.75em 0 0,
		0.5em 0 0,
		0.25em 0 0;
}
.eye:after {
	background: none repeat scroll 0 0 #000;
	border-radius: 50%;
	box-shadow:
		-2.9em -0.3em 0 -0.9em hsla(0, 0%, 100%, 0.8),
		-2.1em -1.9em 0 -0.2em rgba(255,255,255,0.5),
		2em -6em 2em 6em hsla(0, 0%, 0%,0.5),
		0 1em 1em 4em hsla(20, 70%, 5%,1) inset,
		0 0 0.1em 1.5em hsla(10, 20%, 8%,1),
		-2.3em 4em 0em 3em hsla(20, 250%, 50%,0.2),
		0 0 0.1em 3.4em hsl(20, 70%, 20%),
		0 0 0.1em 3.9em #200;
	content: "";
	display: block;
	font-size: 0.7em;
	height: 3em;
	left: 6em;
	position: absolute;
	top: 3em;
	width: 3em;
	z-index: -5;
}
.eye {
	background: #F8F8FF;
	height: 7em;
	margin: 3em auto;
	position: absolute;
	overflow:hidden;
	left:4em;
	top:3em;
	width: 10em;
	z-index:10;
	border-radius: 0 90% 0 100%;
	box-shadow:
	/* eyeline */
		-0.2em -0.4em 0.3em 0.2em hsl(90, 20%, 10%),
		0.2em 0.5em 0.1em -0.1em hsl(240, 100%, 17%) inset,
		-0.1em -0.4em 0.1em 0.2em hsl(90, 20%, 10%),
	/* eye edge inside */
		-0.2em -0.1em 0em 0em hsl(20, 70%, 40%) inset,
		-0.2em -0.1em 0em 0em hsl(20, 70%, 40%) inset,
		0.1em 0.1em 0.1em 0.1em hsl(30, 70%, 50%) inset,
	/* eyelashes shadow */
		-0.3em 0.3em 1em 0 hsl(0, 0%, 0%) inset,
	/* eye shadow */
		-1em -2em 1.5em 1em hsla(230, 80%, 30%,0.2),
		1em -2em 1em 1em hsla(80, 80%, 30%,0.2),
	/* highlight on upper eyelid */
		-0.1em -0.8em 0.5em 0.9em hsla(30, 68%, 83%, 0.7),
	/* upper eyelid fold line */
		0.2em -0.8em 0.3em 0.6em hsla(30, 100%, 20%,1),
		0.2em -0.9em 0.6em 0.8em hsl(30, 100%, 30%),
	/* highlight on upper eyelid */
		-0.2em -4.5em 2em 1em hsla(30, 70%, 80%,0.5),
		0em -4.5em 2em 1em hsla(30, 70%, 80%,0.5),
		0.4em -4.5em 2em 1em hsla(30, 70%, 80%,0.5),
	/* eye socket */
		1.5em -1.2em 2.7em 3em hsla(30, 70%, 50%,0.7),
		0.4em -0.7em 0.6em 0.6em hsl(30, 100%, 30%),
	/* eye bag */
		-0.4em 0.3em 0.5em 0.4em hsla(30, 50%, 80%,0.8),
		-0.4em 0.2em 0.8em 0.8em hsla(30, 60%, 90%,0.8),
		-0.9em 0.2em 0.5em 0.8em hsla(30, 50%, 80%,0.8),
		-0.1em -1.1em 0.6em 0.6em hsla(30, 80%, 20%,0.6),
		-0.1em 0.3em 0.6em 0.8em hsla(30, 80%, 20%,0.6),
		0 0 1em 5em hsl(30, 90%, 82%);
	-webkit-transform: translate3d(0,0,0) rotate(-30deg);
	-moz-transform: translate3d(0,0,0) rotate(-30deg);
	transform: translate3d(0,0,0) rotate(-30deg);
	-webkit-transition:all 0.4s;
	-moz-transition:all 0.4s;
	transition:all 0.4s;
}
.wrap:hover .eye,
.wrap:hover .eye:before,
.wrap:hover .eye:after {
    border-radius: 0;
	box-shadow:none;
    -webkit-transform: translate3d(0,0,0);
    -moz-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}
              
            
!

JS

              
                
              
            
!
999px

Console