Pen Settings



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


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


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.


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.


	h1 Material Design Form Label Effect
	p Go To Blog:
		a(href="", target="_blank") Google Material Design 表單標籤效果
		input#name(type="text", required)
		label(for="name") Name
		label(for="nickname") Nickname


                *, *::before, *::after
	box-sizing: border-box

	margin: 50px auto
	padding-right: 12px
	padding-left: 12px
	max-width: 420px

	margin-bottom: 24px
	text-align: center
	font-size: 20px

	text-decoration: none
	color: #00baff
	transition: .3s
		color: #008BBF

	position: relative
	margin-bottom: 16px
		appearance: none
		padding: 14px 10px 0
		width: 100%
		height: 48px
		line-height: 20px
		border: 1px solid #CCC
		border-radius: 4px
		outline: none
		+ label
			position: absolute
			top: 14px
			left: 10px
			letter-spacing: 1px
			font-size: 18px
			color: #9E9E9E
			cursor: text
			transition: .2s ease-in-out
		&[required] + label::after
			content: '*'
			color: #F44336
		&:focus, &.fill
			+ label
				top: 6px
				font-size: 12px
			border-color: #00baff


                $(function() {
	$('.input-block input').each(function() {
		const _this = $(this);
		_this.on('input', e => {
			_this.val() !== '' ? _this.addClass('fill') : _this.removeClass('fill');