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.

            
              <div class="frame">
	<div class="eye">
		<div class="ball">
			<div class="iris"></div>
		</div>
	</div>
	<div class="lid-top">
		<svg width="240px" height="106px" viewBox="0 0 240 106">
			<path d="M239.461093,106 L240,106 L240,0 L0,0 L0,106 L0.538906982,106 C5.9904782,95.5378089 52.3717687,81 120,81 C187.628231,81 234.009522,95.5378089 239.461093,106 Z" class="lid"></path>  
		</svg>
	</div>
	<div class="lid-bottom">
		<svg width="240px" height="106px" viewBox="0 0 240 106">
			<path d="M239.461093,106 L240,106 L240,0 L0,0 L0,106 L0.538906982,106 C5.9904782,95.5378089 52.3717687,81 120,81 C187.628231,81 234.009522,95.5378089 239.461093,106 Z" class="lid"></path>  
		</svg>
	</div>
</div>
            
          
!
            
              .frame {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 400px;
	height: 400px;
	margin-top: -200px;
	margin-left: -200px;
	border-radius: 2px;
	box-shadow: 1px 2px 10px 0px rgba(0,0,0,0.3);
	overflow: hidden;
	background: #363847;
	color: #fff;
	font-family: 'Open Sans', Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.eye {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%) rotate(45deg);
	width: 160px;
	height: 160px;
	border-radius: 160px 0;
	background: #D8D8D8;
	overflow: hidden;
	transition: all .5s ease-in-out;

	.ball {
		position: absolute;
		width: 110px;
		height: 110px;
		border-radius: 50%;
		background: #fff;
		top: 25px;
		left: 25px;
		animation: ball 5s ease-in-out infinite;

		.iris {
			position: absolute;
			width: 36px;
			height: 36px;
			border-radius: 50%;
			background: #617983;
			top: 37px;
			left: 37px;
		}

	}

}

.lid {
	fill: #363847;
	stroke: none;
}

.lid-top {
	position: absolute;
	z-index: 2;
	width: 240px;
	height: 106px;
	top: 125px;
	left: 80px;
	transform: translateY(-60px);
	animation: lid-top 5s ease-in-out infinite;
}

.lid-bottom {
	position: absolute;
	z-index: 2;
	width: 240px;
	height: 106px;
	bottom: 125px;
	left: 80px;
	transform: rotate(180deg) translateY(-60px);
	animation: lid-bottom 5s ease-in-out infinite;
}

.frame:hover {

	.lid-top {
		transform: translateY(0);
	}
	.lid-bottom {
		transform: rotate(180deg) translateY(0);
	}

}

@keyframes lid-top {
	0%,10%,18%, 26%,34%, 48%,56%, 76%, 84% {
		transform: translateY(-60px);
	}
	14%, 30%, 52%, 80% {
		transform: translateY(0);
	}
}

@keyframes lid-bottom {
	0%,10%,18%, 26%,34%, 48%,56%, 76%, 84% {
		transform: rotate(180deg) translateY(-60px);
	}
	14%, 30%, 52%, 80% {
		transform: rotate(180deg) translateY(0);
	}
}

@keyframes ball {
	0%,14%, 56% {
		transform: rotate(-45deg) translateX(0);
	}
	18%, 30% {
		transform: rotate(-45deg) translate(-25px, 5px) scale(0.9);
	}
	34%, 52% {
		transform: rotate(-45deg) translate(25px, 10px) scale(0.9);
	}
}
            
          
!
999px
Loading ..................

Console