cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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">
	<input type="checkbox" id="cb">
	<label for="cb" class="button">Send mail</label>
	<label for="cb" class="button reset">Reset</label>
	<div class="circle"></div>
	<div class="circle-outer"></div>
	<svg class="icon mail">
		<polyline points="119,1 119,69 1,69 1,1"></polyline>
		<polyline points="119,1 60,45 1,1 119,1"></polyline>
	</svg>
	<svg class="icon plane">
		<polyline points="119,1 1,59 106,80 119,1"></polyline>
		<polyline points="119,1 40,67 43,105 69,73"></polyline>
	</svg>
</div>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Open+Sans:600);

.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);
  background: #2c3e50;
	font-family: 'Open Sans', Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow: hidden;
}

.circle {
	position: absolute;
	width: 200px;
	height: 200px;
	top: 65px;
	left: 100px;
	background: #354A5F;
	border-radius: 50%;
}

.circle-outer {
	@extend .circle;
	box-sizing: border-box;
	background: none;
	border: 4px solid #354A5F;
}

.icon {
	position: absolute;
	z-index: 2;
	top: 130px;
	left: 140px;
	transform: translate3d(0,0,0);
	fill: none;
	stroke-width: 2px;
	stroke: #ecf0f1;
	stroke-linecap: square;
	stroke-dasharray: 325 325;
	
	&.mail {
		width: 120px;
		height: 70px;
		stroke-dashoffset: 0;
	}
	
	&.plane {
		width: 120px;
		height: 110px;	
		stroke-dashoffset: 325;
	}
	
}

#cb {
	display: none;
}

.button {
	position: absolute;
	z-index: 10;
	width: 200px;
	height: 40px;
	top: 290px;
	left: 100px;
	background: #ecf0f1;
	color: #2c3e50;
	text-align: center;
	line-height: 40px;
	border-radius: 20px;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 15px;
	cursor: pointer;
		
	&.reset {
		opacity: 0;
		z-index: 5;
	}
	
	&:hover {
		background: #1abc9c;
		color: #fff;
	}

}

#cb:checked ~ .button {
	animation: button 1.5s ease-in-out 1.7s;
	animation-fill-mode: both;
}
#cb:checked ~ .reset {
	animation: reset 1s ease-in-out 3.7s;
	animation-fill-mode: both;
}

#cb:checked ~ .circle {
	animation: circle 1s ease-in-out;
	animation-fill-mode: both;
}

#cb:checked ~ .circle-outer {
	animation: circle .8s ease-in-out .2s;
	animation-fill-mode: both;
}

#cb:checked ~ .mail {
	stroke-dashoffset: 326;
	transition: stroke-dashoffset 1s ease-in-out;
}

#cb:checked ~ .plane {
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 1s ease-in-out .6s;
	animation: fly 2.4s ease-in-out;
	animation-fill-mode: both;
}

@keyframes fly {
	0%, 50% {
		transform: translate3d(0,0,0) scale(1);
	}
	60% {
		transform: translate3d(-10px,5px,0) scale(1.05);
	}
	70% {
		opacity: 1;
	}
	85% {
		opacity: 0;
	}
	100% {
		transform: translate3d(300px,-150px,0) scale(0.4);
		opacity: 0;
	}
}

@keyframes circle {
	0% {
		transform: translate3d(0,0,0) scale(1);
	}
	20% {
		transform: scale(1.1);
	}
	100% {
		transform: scale(0);
	}
}

@keyframes button {
	0% {
		transform: scale(1);
	}
	30% {
		background: #1abc9c;
		color: transparent;
		width: 200px;
		left: 100px;
	}
	50%,60% {
		width: 40px;
		left: 180px;
		transform: scale(1);
	}
	70% {
		transform: scale(1.1);
	}
	100% {
		width: 40px;
		left: 180px;
		background: #1abc9c;
		color: transparent;
		transform: scale(0);
	}
}

@keyframes reset {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console