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

              
                body
  .header
    .menu
      button.btn 我是按鈕
    .banner-title 我是 banner-title
    .main-menu
      a 我是 main-menu
  .content
    h2 我是 h2
  .footer
    h3 我是 h3
    p 我是 p
              
            
!

CSS

              
                // F - Font
$F-base-size: 16px
$F-lg-size: $F-base-size * 1.5

// FC - Font-Color
$FC-base-font-color: #000
$FC-blue-font-color: #0000FF
$FC-white-font-color: #fff

// BC - BgColor
$BC-red-bg-color: #ff0000

// S - Size
$S-base-width-size: 1380px

body
  font-size: $F-base-size
  color: $FC-base-font-color
.header
  background-image: url(../header_desktop.png)
  .menu
    top: 0px
    .btn
      color: $FC-blue-font-color
  .banner-title
    max-width: $S-base-width-size / 4
    background: $BC-red-bg-color
    color: $FC-white-font-color
    font-size: $F-lg-size
  .main-menu
    background: $BC-red-bg-color
    overflow: hidden
    a:hover
      background: $BC-red-bg-color
.content 
  h2
    font-size: $F-lg-size
.footer 
  h3
    font-size: $F-lg-size
.footer 
  p
    color: $FC-blue-font-color
              
            
!

JS

              
                
              
            
!
999px

Console