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

              
                <div class="popup-container">
	<label class="button" for="login-popup">LOGIN</label>
	<input type="checkbox" id="login-popup">
	<div class="popup">
		<label for="login-popup"></label>
		<div class="inner">
			<div class="title">
				<h6>LOGIN</h6>
				<label for="login-popup">
					<i class="fa fa-times"></i>
				</label>
			</div>
			<div class="content">
				<ul>
					<li>
						<input type="text" placeholder="Username">
					</li>
					<li>
						<input type="password" placeholder="Password">
					</li>
					<li>
						<button type="submit">Login</button>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>

<div class="popup-container">
	<label class="button" for="register-popup">REGISTER</label>
	<input type="checkbox" id="register-popup">
	<div class="popup">
		<label for="register-popup"></label>
		<div class="inner">
			<div class="title">
				<h6>REGISTER</h6>
				<label for="register-popup">
					<i class="fa fa-times"></i>
				</label>
			</div>
			<div class="content">
				<ul>
					<li>
						<input type="text" placeholder="Username">
					</li>
					<li>
						<input type="text" placeholder="E-mail address">
					</li>
					<li>
						<input type="password" placeholder="Password">
					</li>
					<li>
						<button type="submit">Register</button>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>

<div class="popup-container">
	<label class="button" for="contract-popup">CONTRACT</label>
	<input type="checkbox" id="contract-popup">
	<div class="popup">
		<label for="contract-popup"></label>
		<div class="inner">
			<div class="title">
				<h6>CONTRACT</h6>
				<label for="contract-popup">
					<i class="fa fa-times"></i>
				</label>
			</div>
			<div class="content">
				<p>
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean faucibus luctus felis, sodales rutrum mi. Nullam vitae justo vel augue cursus tincidunt at vitae libero. Donec arcu massa, posuere in lacus quis, ultricies tempor tellus. Nulla facilisi. Vivamus commodo ac elit et finibus. Nam turpis dolor, facilisis ac augue at, imperdiet fermentum metus. Duis volutpat nisi vel nunc tincidunt, nec dignissim lacus porttitor. Nulla pharetra metus at sem scelerisque, non hendrerit neque consectetur. Ut sagittis, felis sed tincidunt molestie, ligula nunc rhoncus augue, auctor hendrerit est purus eget magna. Sed libero enim, volutpat et vulputate id, aliquam id massa.
				</p>
				<p>
					Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras nec ligula imperdiet, porta lectus vel, semper purus. Aenean gravida, nisi vel vulputate congue, nisl lectus porttitor est, at consectetur lectus quam vitae neque. Sed sit amet neque et tellus mattis aliquet. Donec luctus, nisl at congue dapibus, diam augue pharetra leo, eu maximus mi purus imperdiet mi. Pellentesque a auctor nulla. Vestibulum feugiat tristique nisi quis condimentum. Etiam massa quam, posuere eget nunc vel, viverra tincidunt elit. In sed scelerisque lectus. Praesent aliquam dolor at posuere condimentum. In tellus orci, convallis vitae leo eget, mollis feugiat dui. Nam vitae ligula ex.
				</p>
				<p>
					Cras tortor ipsum, semper vitae viverra lobortis, ultricies convallis metus. Vestibulum at ex eget lorem viverra sollicitudin. Nunc consectetur et quam tincidunt hendrerit. Nullam porttitor eleifend tellus, porttitor semper massa venenatis ac. Pellentesque eget velit fringilla neque facilisis auctor at non lorem. Vestibulum eget venenatis arcu. Duis nibh augue, ultricies eget purus non, blandit luctus tellus. Sed ante risus, sagittis imperdiet ex quis, pellentesque blandit augue. Cras fermentum lobortis odio quis vestibulum. Pellentesque efficitur elementum urna, vitae malesuada leo accumsan elementum.
				</p>
				<p>
					Curabitur finibus, nisi non luctus viverra, ipsum libero suscipit lectus, aliquam tincidunt neque enim sit amet sem. Cras quis porttitor urna. Proin ultrices magna vel neque pulvinar, ut iaculis lorem blandit. Phasellus vitae mi sed est luctus hendrerit. Donec et ultricies tortor. Donec interdum, sem a facilisis egestas, purus sapien vestibulum leo, ut congue risus massa sed orci. Duis tincidunt auctor metus, eget pharetra ligula rhoncus non. Proin in urna in tortor fringilla dapibus id in velit. Donec vulputate ut sem sed semper. Cras lacus elit, porta a commodo venenatis, iaculis et massa. Nunc aliquam congue lorem, eu pulvinar turpis consectetur at. Morbi fringilla placerat enim, non ornare mi mollis nec. Vivamus nec ultricies purus. Nullam dapibus erat non metus condimentum laoreet. Mauris sed libero viverra, efficitur enim dictum, laoreet nibh. Fusce in accumsan lacus.
				</p>
				<p>
					Phasellus mollis egestas sapien, sit amet sodales ipsum placerat non. Nulla sit amet pellentesque libero, blandit tincidunt nisl. Mauris hendrerit libero a viverra lobortis. Nam eget mollis nunc, id suscipit eros. Morbi nec sem vel ipsum dignissim elementum. Nulla scelerisque justo et eleifend ultrices. Suspendisse imperdiet placerat ligula, vel dictum ligula tempus eget. Etiam massa velit, aliquam sit amet porta eu, varius in turpis. Pellentesque at dictum felis, et blandit risus. Sed vitae porta tellus. Donec egestas scelerisque dapibus.
				</p>
				<div class="close-btn">
					<label for="contract-popup">
						CLOSE POPUP
					</label>
				</div>
			</div>
		</div>
	</div>
</div>
              
            
!

CSS

              
                body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.popup-container {
	display: inline-flex;
	.button {
		height: 40px;
		line-height: 40px;
		background: blue;
		padding: 0 15px;
		border-radius: 3px;
		font-size: 14px;
		color: #fff;
		cursor: pointer;
	}
	.popup {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(#000,.5);
		z-index: 10;
		opacity: 0;
		visibility: hidden;
		transition: 400ms all;
		>label {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			cursor: pointer;
		}
		.inner {
			position: absolute;
			top: 100%;
			left: 50%;
			transform: translate(-50%, -50%);
			background: #fff;
			min-width: 300px;
			box-sizing: border-box;
			transition: 400ms all;
			z-index: 10;
			max-height: 100%;
			overflow: auto;
			.title {
				height: 40px;
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 0 15px;
				position: sticky;
				top: 0;
				background: #fff;
				h6 {
					font-size: 15px;
					font-weight: 500;
				}
				label {
					font-size: 14px;
					color: #999;
					cursor: pointer;
					&:hover {
						color: #222;
					}
				}
			}
			.content {
				padding: 5px 15px 15px;
				ul {
					li {
						margin-bottom: 15px;
						&:last-child {
							margin-bottom: 0;
						}
						input {
							width: 100%;
							box-sizing: border-box;
							border: none;
							border-bottom: 1px solid #ddd;
							padding-bottom: 10px;
							font-size: 12px;
							&:focus {
								outline: 0;
								border-color: blue;
							}
						}
						button {
							width: 100%;
							height: 30px;
							border-radius: 3px;
							border: none;
							background: blue;
							color: #fff;
							font-size: 13px;
							cursor: pointer;
						}
					}
				}
				p {
					font-size: 13px;
					line-height: 130%;
					margin-bottom: 15px;
					&:last-child {
						margin-bottom: 0;
					}
				}
				.close-btn {
					margin-top: 15px;
					padding-top: 15px;
					border-top: 1px solid #ddd;
					label {
						background: rgba(#000, .05);
						display: block;
						line-height: 30px;
						text-align: center;
						font-size: 13px;
						color: #444;
						border-radius: 3px;
						cursor: pointer;
						&:hover {
							background: rgba(#000,.1);
						}
					}
				}
			}
		}
	}
	>input {
		position: absolute;
		left: -9999px;
		opacity: 0;
		&:checked + .popup {
			opacity: 1;
			visibility: visible;
			.inner {
				top: 50%;
			}
		}
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console