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

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

              
                <body>
	<div class="name-tag">
		<div class="hello">
			<div id="hello">HELLO</div>
			<div id="my-name-is">my name is</div>
		</div>
		<form class="form">
			<div><input type="text" placeholder="Enter Name" required/></div>
			<div><input type="email" placeholder="and Email" required/></div>
			<div><button type="submit">Let's Go! <i class="fa fa-arrow-right"></i></button></div>
		</form>
		<div class="underbar"></div>
	</div>
	<div class="greeting">Hey <span></span>! Thanks for signing up!</div>	
</body>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Gochi+Hand)

body
	font-family: "Helvetica", sans-serif
	height: 100vh
	background: linear-gradient(#e53935 0%, #eea849 100%)

.name-tag
	position: relative
	margin: 90px auto
	height: 240px
	width: 350px
	background: #fff
	border-radius: 10px
	transform: rotate(-3deg)
	
.hello
	height: 80px
	width: 340px
	background: #0E9BD6
	text-align: center
	color: #fff
	border: 5px solid #fff
	border-top-left-radius: 10px
	border-top-right-radius: 10px

#hello
	margin-top: 8px
	font-weight: 600
	font-size: 33px
	letter-spacing: 10px

#my-name-is
	font-size: 18px
	font-weight: 200
	letter-spacing: 1px

.underbar
	position: absolute
	top: 198px
	left: 5px
	height: 37px
	width: 340px
	background: #0E9BD6
	border-bottom-left-radius: 6px
	border-bottom-right-radius: 6px
	z-index: -1

form
	display: flex
	flex-direction: column
	justify-content: center
	align-items: center
	margin: 7px 0 0 0
	button
		position: absolute
		top: 198px
		left: 5px
		height: 37px
		width: 340px
		background: #0E9BD6
		color: #fff
		font-weight: 600
		border-bottom-left-radius: 6px
		border-bottom-right-radius: 6px
		border: 0
		transition: all .2s
		i
			//opacity: 0
		&:active
			outline: none
	input[type="text"], input[type="email"]
		width: 300px
		font-family: 'Gochi Hand', cursive
		text-align: center
		border: 0
		//border-bottom: 2px dashed #aaa
		outline: none
		&:valid, &:focus
			border: 0
	input[type="text"]
		font-size: 45px
		
	input[type="email"]
		font-size: 22px
		margin-top: 7px
		
.greeting
	display: none
	height: 100px
	font-size: 35px
	font-weight: 200
	color: #fff
	text-align: center
	span
		font-weight: 600
	
              
            
!

JS

              
                $(document).ready(function(){
	
	//$("input[type=text]").focus();
	
	$("button").click(function() {
		var nameValue = $("input[type=text]").val().trim(),
				emailValue = $("input[type=email]").val().trim(),
				nameField = $("input[type=text]"),
				emailField = $("input[type=email]");
		
		if(nameValue && emailValue) {
			$(this).remove();
			nameField.prop("disabled", true);
			emailField.prop("disabled", true);
			$("span").append(nameValue);
			$(".greeting").show(300);
		}
	});
});
              
            
!
999px

Console