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

              
                <body>
    <div class="box">
        <div class="item item1">
            1Lorem, ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit ducimus exercitationem ex minima
            minus expedita dolores nisi dolore ut cumque?
        </div>
        <div class="item item2">
            2Lorem, ipsum dolor sit amet consectetur adipisicing elit. 
        </div>
        <div class="item item3">
            3Lorem, ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit ducimus exercitationem ex minima
            minus expedita dolores nisi dolore ut cumque?
        </div>
    </div>

</body>
              
            
!

CSS

              
                /*控制items物件的主軸長度。主軸是橫的那他的長度就是寬,主軸是直的那他的長度就是上至下的高*/
.box{
  width: 960px;
  height: 300px;
  border:6px solid red;
  display:flex;
  flex-direction:row;
  justify-content:center;
  align-items:center;
}
.item{
  /*width: 200px;*/
  flex-basis:300px;/*可自行調整數值,並開啟開發人員工具看看*/
  height: 200px;
}
/*width與flex-basis一起設定屬性是相衝突的,所以它們並非取其一。看誰屬性強就依此為準*/
.item:first-letter{
    font-size: 30px;
}
.item1{background: #fa0;}
.item2{background: #afa;}
.item3{background: #aaf;}
/*
影片:http://bit.ly/2oNwAvH 
1:43:00
*/
              
            
!

JS

              
                
              
            
!
999px

Console