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

              
                <dl>
  <dt>表格两列布局,左边分类右边内容,一列固定宽度,一列自适应宽度,高度自动平行</dt>
  <dd class="box-1">
    <table>
      <tr>
        <td class="left">分类列表区域</td>
        <td class="right">主要内容区域<p>这是p标签的内容</p></td>
      </tr>
    </table>
  </dd>
  <dt>表格两列布局,左边内容右边分类,一列固定宽度,一列自适应宽度,高度自动平行</dt>
  <dd class="box-1">
    <table>
      <tr>
        <td class="right">右边主要内容区域<p>这是p标签的内容</p></td>
        <td class="left">左边列表区域</td>
      </tr>
    </table>
  </dd>
  <dt>表格两列布局,左边内容右边分类,按照宽度的百分比自适应</dt>
  <dd class="box-3">
    <table>
      <tr>
        <td class="left">左边列表区域</td>
        <td class="right">右边主要内容区域<p>这是p标签的内容</p></td>
      </tr>
    </table>
  </dd>
</dl>
              
            
!

CSS

              
                dl{
  padding: 0;
  margin: 10px;
  dt{
    margin-top: 10px;
    font-size: 20px;
    color: #fff;
    background-color: #00c;
    height: 50px;
    line-height: 50px;
    padding: 0 10px;
  }
  dd{
    border: 1px solid #ccc;
    margin: 0;
    height: 300px;
    table{
      width: 100%;
      height: 100%;
      border-collapse: collapse;
      border-spacing:0;
      td{
        vertical-align: top;
        padding: 20px;
      }
    }
  }
  .left{background-color: pink;}
  .right{background-color: skyblue;}
}
.box-1{
  .left{
    width: 200px;
  }
}
.box-3{
  .left{
    width: 20%;
  }
  .right{
    width: 80%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console