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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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="container">
	<div class="form-wrapper">
		<h2 class="text-center">Satisfaction Survey</h2>
		<p class="text-center">We value your feeback, rate our support services</p>
		<div class="smiles d-flex justify-content-around">
			<div class="happy">
				<svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="#000000" d="M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8C16.3,8 17,8.7 17,9.5M12,17.23C10.25,17.23 8.71,16.5 7.81,15.42L9.23,14C9.68,14.72 10.75,15.23 12,15.23C13.25,15.23 14.32,14.72 14.77,14L16.19,15.42C15.29,16.5 13.75,17.23 12,17.23Z" />
				</svg>
				<div class="text">HAPPY</div>
			</div>
			<div class="meh"><svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="#000000" d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M8.5,11A1.5,1.5 0 0,1 7,9.5A1.5,1.5 0 0,1 8.5,8A1.5,1.5 0 0,1 10,9.5A1.5,1.5 0 0,1 8.5,11M17,9.5A1.5,1.5 0 0,1 15.5,11A1.5,1.5 0 0,1 14,9.5A1.5,1.5 0 0,1 15.5,8A1.5,1.5 0 0,1 17,9.5M16,14V16H8V14H16Z" />
				</svg>
				<div class="text">NEUTRAL</div>
			</div>
			<div class="sucks"><svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="#000000" d="M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,14C13.75,14 15.29,14.72 16.19,15.81L14.77,17.23C14.32,16.5 13.25,16 12,16C10.75,16 9.68,16.5 9.23,17.23L7.81,15.81C8.71,14.72 10.25,14 12,14Z" />
				</svg>
				<div class="text">UNHAPPY</div>
			</div>

		</div>
		<div class="form-group">
			<label for="details">Additional feedback</label>
			<textarea class="form-control" id="details" rows="2"></textarea>
		</div>
		<div class="btn btn-secondary btn-block" id="yes">Tell us what you think!</div>
	</div>
</div>
              
            
!

CSS

              
                body {
	font-family: "Work Sans", sans-serif;
	background-color: #EFEFEF;
}
.container {
	position: relative;
	width: 100vw;
	height: 100vh;
	margin-bottom:100px;
}
.form-wrapper {
	opacity:0;
	padding: 50px 20px 0px 20px;
	position: absolute;
	top: 0px;
	right: 0px;
	left: 0px;
	bottom: 0px;
	min-width:70vw;
	min-height:70vh;
	margin: auto;
	-webkit-animation: tilt-in-fwd-tr 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s forwards;
	        animation: tilt-in-fwd-tr 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s forwards;
	
}
.smiles {
	padding-top: 10px;
}
.smiles > div {
	border-radius:50%;
	min-width: 80px;
	min-height: 80px;
	cursor: pointer;
	text-align: center;
	background-color: #a5a5a5;
}
.text {
	font-size: small;
	font-weight: bold;
	padding-top: 10px;
}
.smiles > div > svg {
	margin-top: 12px;
}
.form-group {
	margin-top: 20px;
}
textarea {
	resize: none;
}
.smiles > div {
	transition: background-color 250ms ease-in-out, color 250ms ease-in-out;
}
.smiles > div:nth-child(1) {
	background-color: rgba(0, 150, 51, 0.3);
}
.smiles > div:nth-child(2) {
	background-color: rgba(255, 235, 59, 0.3);
}
.smiles > div:nth-child(3) {
	background-color: rgba(237, 20, 61, 0.3);
}
.smiles > div:nth-child(1):hover {
	background-color: rgba(0, 150, 51, 1);
	color: white;
}
.smiles > div:nth-child(2):hover {
	background-color: rgba(255, 235, 59, 1);
	color: white;
}
.smiles > div:nth-child(3):hover {
	color: white;
	background-color: rgba(237, 20, 61, 1);
}
.smiles > div svg > path {
	transition: fill 250ms ease-in-out;
}
.smiles > div:hover svg > path {
	fill: white;
}
.smiles > div:nth-child(1).active {
	background-color: rgba(0, 150, 51, 1);
	color: white;
}
.smiles > div:nth-child(2).active {
	background-color: rgba(255, 235, 59, 1);
	color: white;
}
.smiles > div:nth-child(3).active {
	color: white;
	background-color: rgba(237, 20, 61, 1);
}
.smiles > div.active svg > path {
	fill: white;
}
#yes {margin-bottom:20px;}

@-webkit-keyframes tilt-in-fwd-tr {
  0% {
    -webkit-transform: rotateY(20deg) rotateX(35deg) translate(300px, -300px) skew(-35deg, 10deg);
            transform: rotateY(20deg) rotateX(35deg) translate(300px, -300px) skew(-35deg, 10deg);
    opacity: 0;
  }
  100% {
    -webkit-transform: rotateY(0) rotateX(0deg) translate(0, 0) skew(0deg, 0deg);
            transform: rotateY(0) rotateX(0deg) translate(0, 0) skew(0deg, 0deg);
    opacity: 1;
  }
}
@keyframes tilt-in-fwd-tr {
  0% {
    -webkit-transform: rotateY(20deg) rotateX(35deg) translate(300px, -300px) skew(-35deg, 10deg);
            transform: rotateY(20deg) rotateX(35deg) translate(300px, -300px) skew(-35deg, 10deg);
    opacity: 0;
  }
  100% {
    -webkit-transform: rotateY(0) rotateX(0deg) translate(0, 0) skew(0deg, 0deg);
            transform: rotateY(0) rotateX(0deg) translate(0, 0) skew(0deg, 0deg);
    opacity: 1;
  }
}

              
            
!

JS

              
                (function(){
	'use strict';
	$('.smiles > div').on('click',function(){
		$('.smiles > div').removeClass('active');
		$(this).addClass('active');
	});
	$('#yes').on('click',function(){
		alert('Thank you for viewing my codepen');
	});
	
}());
              
            
!
999px

Console