Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- JQUERY AND NORMALIZED CSS INSTALLED
View settings for more info. -->


<div id="formContainer">
	
	<div class="formLeft">
		<img src="https://images.pexels.com/photos/555790/pexels-photo-555790.png?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260">
	</div>
	<div class="formRight">
		<!-- Forgot password form -->
		<form id="forgot" class="otherForm">
			<header>
				<h1>Forgot Password</h1>
				<p>Seems like your password is missing</p>
			</header>
			<section>
				<label>
					<p>Email</p>
					<input type="email" placeholder=" ">
					<div class="border"></div>
				</label>
				<button type="submit">Send email</button>
			</section>
			<footer>
				<button type="button" class="forgotBtn">Back</button>
			</footer>
		</form>
		
		<!-- Login form -->
		<form id="login">
			<header>
				<h1>Welcome back</h1>
				<p>Login to continue</p>
			</header>
			<section>
				<label>
					<p>Username</p>
					<input type="text" placeholder=" ">
					<div class="border"></div>
				</label>
				<label>
					<p>Password</p>
					<input type="password" placeholder=" ">
					<div class="border"></div>
				</label>
				<button type="submit">Login</button>
			</section>
			<footer>
				<button type="button" class="forgotBtn">Forgot password?</button>
				<button type="button" class="registerBtn">Need an account?</button>
			</footer>
		</form>
		
	<!-- Register form -->
		<form id="register" class="otherForm">
			<header>
				<h1>Become a Bro</h1>
				<p>Register to gain full access</p>
			</header>
			<section>
				<label>
					<p>Username</p>
					<input type="text" placeholder=" ">
					<div class="border"></div>
				</label>
				<label>
					<p>Email</p>
					<input type="email" placeholder=" ">
					<div class="border"></div>
				</label>
				<label>
					<p>Password</p>
					<input type="password" placeholder=" ">
					<div class="border"></div>
				</label>
				<label>
					<p>Repeat Password</p>
					<input type="password" placeholder=" ">
					<div class="border"></div>
				</label>
				<button type="submit">Register</button>
			</section>
			<footer>
				<button type="button" class="registerBtn">Back</button>
			</footer>
		</form>
	</div>
	
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800');
* {outline-width: 0; font-family: 'Nunito' !important;}

// Background Image will change daily.
$image: 'https://source.unsplash.com/2560x1440/daily';

// Colour of buttons
$main: #00897B;

body {
	height: 100vh;
	width: 100vw;
	background: url($image) center/cover fixed;
	display: flex;
	justify-content: center;
	align-items: center;
}

#formContainer {
	display: flex;
	transition: 0.2s ease;
	height: 342.5px;
	transition-delay: 0.3s;
	&.toggle {
		height: 480px;
		transition-delay: 0s;
	}
}

.formLeft {
	background: #fff;
	border-radius: 5px 0 0 5px;
	padding: 0 35px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	img {
		display: block;
		width: 72px;
		border-radius: 50%;
		box-shadow: 0 5px 5px rgba(0,0,0,0.2);
	}
}

.formRight {
	position: relative;
	overflow: hidden;
	border-radius: 0 5px 5px 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	&:before {
		content: "";
		position: absolute;
		top: -10px;
		left: -10px;
		width: calc(100% + 20px);
		height: calc(100% + 20px);
		background: url($image) center/cover fixed;
		box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.5);
		filter: blur(5px);
	}

	form {
		position: relative;
		width: 350px;
		padding: 25px;
		box-sizing: border-box;
		white-space: nowrap;
		overflow: hidden;
		header {
			color: #fff;
			text-align: center;
			margin-bottom: 15px;
			h1 {
				margin: 0;
				font-weight: 400;
				user-select: none;
			}
			p {
				margin: 5px 0 0;
				opacity: 0.5;
				font-size: 14px;
				user-select: none;
			}
		}
		section {
			label {
				display: block;
				margin-bottom: 15px;
				position: relative;
				p {
					color: #fff;
					margin: 0 0 10px 0;
					font-weight: 600;
					font-size: 12px;
					opacity: 0.5;
					user-select: none;
				}
				input {
					width: 100%;
					display: block;
					border: none;
					background: transparent;
					color: #fff;
					border-bottom: 1px solid rgba(255,255,255,0.1);
					padding: 0 0 10px;
					box-sizing: border-box;
					font-weight: 600;
					&:focus ~ .border {
						transform: scale(1,1);
					}
					&:not(:placeholder-shown) ~ .border {
						transform: scale(1,1);
					}
				}
				.border {
					position: absolute;
					bottom: 0;
					left: 0;
					width: 100%;
					height: 2px;
					background: #fff;
					transform: scale(0,1);
					transition: 0.2s ease;
				}
				&:last-child {
					margin-bottom: 0;
				}
			}
			button {
				background: $main;
				border: none;
				width: 100%;
				padding: 10px 0;
				font-weight: 600;
				color: #fff;
				cursor: pointer;
				&:hover {
					background: darken($main, 2%);
				}
			}
		}
		footer {
			margin-top: 15px;
			display: flex;
			button {
				background: transparent;
				padding: 0;
				border: none;
				color: #fff;
				cursor: pointer;
				font-size: 12px;
				font-weight: bold;
				flex: 1;
				opacity: .5;
				&:hover {
					opacity: 1;
				}
			}
		}
		&.otherForm {
			top: 0;
			left: 0;
			position: absolute;
			background: #fff;
			height: 100%;
			z-index: 1;
			display: flex;
			flex-direction: column;
			justify-content: center;
			width: 0;
			padding: 25px 0;
			transition: 0.2s ease;
			transition-delay: .2s;
			border-left: 1px solid rgba(0,0,0,0.1);
			header {
				color: #000;
				opacity: 0;
				transition: 0.2s ease;
				transition-delay: 0s;
			}
			p {
				color: #000;
			}
			section {
				opacity: 0;
				transition: 0.2s ease;
				transition-delay: 0s;
			}
			footer {
				border-top-color: rgba(0,0,0,0.1);
				opacity: 0;
				button {
					color: #000;
				}
			}
			input {
				border-color: rgba(0,0,0,0.1);
				color: #000;
			}
			.border {
				background: #000;
			}
			&.toggle {
				width: 100%;
				padding: 25px;
				transition-delay: 0s;
				header, section, footer {
					opacity: 1;
					transition-delay: 0.3s;
				}
			}
		}
	}
}

              
            
!

JS

              
                // jQuery
$(function() {

	// Switch to Forgot Password
	$('.forgotBtn').click(function() {
		$('#forgot').toggleClass('toggle');
	});
	
	// Switch to Register
	$('.registerBtn').click(function() {
		$('#register, #formContainer').toggleClass('toggle');
	});

});

              
            
!
999px

Console