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

              
                <html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/variable.css">
    <title>Document</title>
</head>
<body>
    <div class="box">
        <h3>標題A</h3>
        <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Cumque quam corrupti soluta! Sequi laudantium, placeat repellendus vero, molestiae rerum, sapiente doloremque amet perspiciatis facere ab odit excepturi modi! Consectetur, saepe.</p>
    </div>
    <div class="box1">
        <h3>標題B</h3>
        <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Odit, similique! Cum recusandae doloribus qui vitae at iusto suscipit quibusdam delectus fugiat sapiente veritatis corporis quaerat tempora distinctio, sint quae temporibus.</p>
    </div>
    <div class="box2">
        <h3>標題C</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque officiis doloremque aspernatur. Hic architecto sunt debitis, quasi possimus esse reprehenderit nam. Asperiores architecto perferendis facilis dolorum quidem inventore nulla fugit!</p>
    </div>
</body>
</html>
              
            
!

CSS

              
                $font-m:16px;/*設定大小時候預設值要放第一個才能成功編譯*/
$font-l:$font-m * 1.5;//24px
$font-s: $font-m * 0.9;//14.4px

$p-color:#222;
$border-color:blue;

.box{
    float: left;
    width: 200px;
    height: auto;
    border:1px solid $border-color;
  h2{
      font-size: 24px;
  } 
  p{
      color:#222;
  } 
}
.box1{
    float: left;
    width: 200px;
    height: auto;
    border:1px solid $border-color;
    h2{
        font-size: $font-m*1.5;
    } 
    p{
        color:$p-color;
    } 
}
.box2{
    float: left;
    width: 200px;
    height: auto;
    border:1px solid $border-color;
    h2{
        font-size: $font-l;
    } 
    p{
        color:$p-color;
    } 
}
              
            
!

JS

              
                
              
            
!
999px

Console