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">
	<section id="ico" class="ico active animate">
		<div class="btn enter" id="contact">
			<div><span><svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="#000000" d="M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6M20 6L12 11L4 6H20M20 18H4V8L12 13L20 8V18Z" />
		</svg></span><span class="text"><span>CONTACT</span></span>
			</div>
		</div>
	</section>
	<section id="frm">
		<div class="form-wrapper">
			<h3 class="text-center"><span>CONTACT</span></h3>
			<p>This contact form is for design only. To contact me, visit my <a href="https://rachelhcreative.com" target="web">website</a>. Please try this form out to see what it does. </p>
			<div class="form-group">
				<label for="name">Name <span class="red">*</span></label>
				<input type="text" class="form-control" required id="name" placeholder="Your name">
			</div>
			<div class="form-group">
				<label for="email">Email address <span class="red">*</span></label>
				<input type="email" class="form-control" required id="email" aria-describedby="emailHelp" placeholder="you@email.com">
				<small id="emailHelp" class="form-text">We'll never share your email with anyone else.</small>
			</div>
			<div class="form-group">
				<label for="details">Details</label>
				<textarea class="form-control" id="details" rows="3"></textarea>
			</div>
			<div id="frm-sb" class="button">SUBMIT</div>
		</div>
	</section>
	<section id="thx">
		<div class="thx-wrapper">
			<h3 class="text-center"><span>THANK YOU</span></h3>
			<p><span id="user"></span>, thank you for testing out my form. If you want to contact me or view more of my projects visit my website:
				<div class="text-center"><a href="https://rachelhdesigner.com" target="_blank">Rachel H. Designer</a></div>
			</p>
			<div class="output">
				<p>Name: <span id="fullname"></span></p>
				<p>Email: <span id="eml"></span></p>
				<p id="det"></p>
			</div>
			<div>
				<div id="frm-st" class="btn custom">
					<div><span><svg style="width:24px;height:24px" viewBox="0 0 24 24">
    <path fill="#000000" d="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z" />
		</svg></span><span class="text"><span>Start Over</span></span>
					</div>
				</div>
			</div>

		</div>
	</section>
</div>
              
            
!

CSS

              
                /*/dark blue : 	#00546f*/
body {
	min-height: 200vh;
	width: 100vw;
	background-color: #e9e9e9;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='32' viewBox='0 0 16 32'%3E%3Cg fill='%2300546f' fill-opacity='0.09'%3E%3Cpath fill-rule='evenodd' d='M0 24h4v2H0v-2zm0 4h6v2H0v-2zm0-8h2v2H0v-2zM0 0h4v2H0V0zm0 4h2v2H0V4zm16 20h-6v2h6v-2zm0 4H8v2h8v-2zm0-8h-4v2h4v-2zm0-20h-6v2h6V0zm0 4h-4v2h4V4zm-2 12h2v2h-2v-2zm0-8h2v2h-2V8zM2 8h10v2H2V8zm0 8h10v2H2v-2zm-2-4h14v2H0v-2zm4-8h6v2H4V4zm0 16h6v2H4v-2zM6 0h2v2H6V0zm0 24h2v2H6v-2z'/%3E%3C/g%3E%3C/svg%3E");
	font-family: "Asap", sans-serif;
}
.container {
}
section {
	display: none;
}
section.active {
	display: block;
	height: 100vh;
}

.btn.enter {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: scale(2);
}
.btn {
	position: absolute;
	top: 50%;
	left: 50%;
	background-color: #00546f;
	transition: b40ackground-color 250ms ease-in-out;
	color: white;
	border-radius: 10px;
	font-size: small;
	font-weight: bold;
}
.btn.custom {
	position: absolute;
	left: 40px;
	top: 400px;
	background-color: rgba(255, 255, 255, 0.2);
}
.btn span:nth-child(2) {
	max-width: 0;

	-webkit-transition: max-width 650ms;
	transition: max-width 650ms;
	display: inline-block;
	vertical-align: top;
	white-space: nowrap;
	overflow: hidden;
}
.btn:hover {
	background-color: #008db9;
}
.btn:hover span {
	max-width: 8rem;
}
.btn span:nth-child(2) > span {
	padding-right: 20px;
	position: relative;
	top: 2px;
	left: 10px;
	min-width: 100px;
}
.text {
	text-transform: uppercase;
	font-weight: bold;
}

.btn > div > span > svg > path {
	fill: white;
}
footer {
	padding-bottom: 20px;
}
.ftr-lnk {
	color: #008db9;
	text-decoration: none;
}
.red {
	color: crimson;
	font-weight: bold;
}
#frm,
#thx {
	padding: 30px 40px;
	margin: 30px 0px;
	background-color: #00546f;
	color: #fff;
	min-height: 700px;
	border: 10px solid #e9e9e9;
}
#thx {
	min-height: 700px;
}
.container {
	display: flex;
	flex-direction: column;
}
#frm a:link,
#frm a:visited {
	color: white;
	text-decoration: underline;
}
small {
	color: #ffffff;
}
h3 {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 10px;
	padding-top: 10px;
	margin-bottom: 20px;
}
.button {
	cursor: pointer;
	background-color: #008db9;
	border-radius: 10px;
	padding: 10px;
	text-align: center;
	color: #fff;
	margin-top: 40px;
	font-weight: bold;
	transition: background-color 250ms ease, color 250ms ease;
}
.button:hover {
	background-color: #b2cbd3;
	color: #444;
}
.required {
	background-color: #fef79b;
	border: 1px solid red;
}
#thx a:link,
#thx a:visited {
	font-size: larger;
	color: #fff;
	text-decoration: underline;
}
.custom > span > svg > path {
	fill: white;
}
.custom > span:nth-child(2) {
	padding-left: 10px;
}
.custom {
}
section {
	opacity: 0;
}
.animate {
	-webkit-animation: fade-in-fwd 0.6s cubic-bezier(0.39, 0.575, 0.565, 1) 1s
		forwards;
	animation: fade-in-fwd 0.6s cubic-bezier(0.39, 0.575, 0.565, 1) 1s forwards;
}
/* ----------------------------------------------
 * Generated by Animista on 2019-12-23 7:44:58
 * Licensed under FreeBSD License.
 * See http://animista.net/license for more info. 
 * w: http://animista.net, t: @cssanimista
 * ---------------------------------------------- */

/**
 * ----------------------------------------
 * animation fade-in-fwd
 * ----------------------------------------
 */
@-webkit-keyframes fade-in-fwd {
	0% {
		-webkit-transform: translateZ(-80px);
		transform: translateZ(-80px);
		opacity: 0;
	}
	100% {
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
		opacity: 1;
	}
}
@keyframes fade-in-fwd {
	0% {
		-webkit-transform: translateZ(-80px);
		transform: translateZ(-80px);
		opacity: 0;
	}
	100% {
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
		opacity: 1;
	}
}

              
            
!

JS

              
                //to create a ui contact button with animation
//to create on click event that will display a simple
//contact form that will only "submit" when the user fills in the
//correct fields
// to display a thank you message using the data that user put in
// the form and to have a reset this page "button event"
(function() {
	"use strict";
	var tst = 0;
	var ct = document.getElementById("contact");
	var ico = document.getElementById("ico");
	var frm = document.getElementById("frm");
	var thx = document.getElementById("thx");
	var det = document.getElementById("details");
	var frmbtn = document.getElementById("frm-sb");
	var user = document.getElementById("user");
	var fnm = document.getElementById("fullname");
	var eml = document.getElementById("eml");
	var details = document.getElementById("details");
	var det = document.getElementById("det");
	function valid(id) {
		if (id.value === "") {
			id.classList.add("required");
		} else {
			id.classList.remove("required");
			tst++;
		}
	}
	ct.addEventListener("click", function() {
		ico.classList.remove("active");
		frm.classList.add("active");
		frm.classList.add("animate");
	});
	var name = document.getElementById("name");
	var email = document.getElementById("email");
	frmbtn.addEventListener("click", function() {
		valid(name);
		valid(email);
		if (tst === 2) {
			frm.classList.remove("active");
			document.body.scrollTop = document.documentElement.scrollTop = 0;
			thx.classList.add("active");
			thx.classList.add("animate");
			user.innerHTML = name.value;
			eml.innerHTML = email.value;
			fnm.innerHTML = name.value;
			if (details.value !== "") {
				det.innerHTML = "<span>Details: </span>" + details.value;
			} else {
				det.innerHTML = "<span>No further details given.</span>";
			}
		}
	});
	document.getElementById("frm-st").addEventListener("click", function() {
		thx.classList.remove("active");
		document.body.scrollTop = document.documentElement.scrollTop = 0;
		ico.classList.add("active");
		ico.classList.add("animate");
		email.value("");
		name.value("");
		details.value("");
	});
})();

              
            
!
999px

Console