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 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

              
                <!--div-->
<div class="container mt-3">
<!--div預設為block區塊元素,加入 .d-inline 變行內元素,寬度沒有100%延伸,只有文字寬度-->
<!--試試把 d-block 加入 .d-inline Class ,因兩個都是行內元素會變成同行-->
  <div class="bg-success mb-1 d-inline">d-inline</div>
  <div class="bg-success mb-1">d-block</div>
</div>

<!--span-->
<div class="container mt-3">
<!--span 預設為inline,加入 .d-block 變區塊元素-->
  <span class="bg-primary mb-1 d-block">d-block</span>
  <span class="bg-primary mb-1">d-inline</span>
</div>

<!--inline-block 結合inline 與 block 屬性-->
<div class="container mt-3">  
  <div class="bg-info mb-1" style="height:50px;">d-inline-block加入height顯示高度</div>
  <div class="bg-info d-inline" style="height:50px;">d-inline加入高度無效</div>
  <div class="bg-info d-inline-block">d-inline-block 未加入高度看來與 d-inline差異不大</div>
</div>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console