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

              
                <p>(1)widthにclamp関数を指定しています。基本的な幅は80vwでレスポンシブルですが、小さくなっても100px、大きくなっても500pxまでに制御できます。</p>
<div class="clamp1 box">
</div>
<br>
<p>(2)フォントのサイズの最大値、最小値を指定できます。基本的なサイズは3vwで指定していますが、小さくても12pxまで、大きくなっても20pxまででサイズを制御できています。</p>
<div class="clamp2">テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。</div>
              
            
!

CSS

              
                .clamp1{
  width:clamp(100px, 80vw, 500px);
}
.clamp2{
  font-size:clamp(12px, 3vw, 20px);
}

.box{
border:1px solid #ddd;
  background-color:#efefef;
  height:100px;
}
              
            
!

JS

              
                
              
            
!
999px

Console