Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <div class="component demo">
  <a href="#collapse-demo" class="btn btn-primary" data-toggle="collapse">
    action link
  </a>
  <button class="btn btn-primary" data-toggle="collapse" data-target="#collapse-demo">
    action button
  </button>
  
  <div class="collapse" id="collapse-demo">
    <div class="card card-body">
      hello~
    </div>
  </div>
</div>

<!-- 先創一個卡片,只採用card-body。另在.collapse加入#collapse-demo,在使用摺疊的時候可以呼叫這個#collapse-demo -->
<!-- 這裏有兩個呼叫的按鈕a連結跟button -->
<!-- a連結就採用btn的樣式btn-primary,加入data-toggle="collapse"代表使用折疊的功能以及href="#collapse-demo"呼叫卡片的id -->

<!-- button部分跟a連結差別就在於a連結有href="#collapse-demo",button則另外加入data-target="#collapse-demo" -->

<!-- 這個功能為折疊,也就是滑動的效果將內容呼叫出來。關閉的時候滑動效果隱藏 -->
              
            
!

CSS

              
                #demo.component{
  padding: 50px;
}
              
            
!

JS

              
                
              
            
!
999px

Console