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="pattern1">
	<textarea placeholder="① デフォルト"></textarea>
</div>
<div class="pattern2">
	<textarea placeholder="② リサイズを禁止"></textarea>
</div> 
<div class="pattern3">
	<textarea placeholder="③ 横方向のリサイズを禁止"></textarea>
</div> 
<div class="pattern4">
	<textarea placeholder="④ 縦方向のリサイズを禁止"></textarea>
</div> 
<div class="pattern5">
	<textarea placeholder="⑤ リサイズにおける最大・最小の幅を指定する"></textarea>
</div> 
              
            
!

CSS

              
                /* この記述は基本指定なので無視して良いです */
textarea{
	width:240px;
	height:120px;
	font-size:12px;
	margin-bottom:15px;
}
	
/* ① デフォルト(.pattern1) */
.pattern1 textarea{
	resize: both;
}
	
/* ② リサイズを禁止(.pattern2) */
.pattern2 textarea{
	resize: none;
}
	
/* ③ 横方向のリサイズを禁止(.pattern3) */
.pattern3 textarea{
	resize: vertical;
}

/* ④ 縦方向のリサイズを禁止(.pattern4) */
.pattern4 textarea{
	resize: horizontal;
}

/* ⑤ リサイズにおける最大・最小の幅を指定する(.pattern6) */
.pattern5 textarea{
	resize: auto;
	max-width: 300px;
	max-height: 300px;
	min-width: 50px;
	min-height: 50px;
}
              
            
!

JS

              
                
              
            
!
999px

Console