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

              
                <table>
  <thead>
    <tr>
      <th>序號</th>
      <th>產品名稱</th>
      <th>價格</th>
      <th>產品描述</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td data-title="序號">A2018010001</td>
      <td data-title="產品名稱">青醬佐番茄香煎烏骨雞腿義式千層麵</td>
      <td data-title="價格">NT.250</td>
      <td data-title="產品描述">獨家青醬、美濃橙蜜香番茄、特選烏骨雞腿、手桿義式千層麵</td>
    </tr>
    <tr>
      <td data-title="序號">A2018010002</td>
      <td data-title="產品名稱">墨魚汁佐迷迭香鮮蝦干貝天使麵</td>
      <td data-title="價格">NT.280</td>
      <td data-title="產品描述">西班牙進口墨魚汁、台灣無毒蝦、北海道干貝、特選天使細麵</td>
    </tr>
  </tbody>
</table>
              
            
!

CSS

              
                table, th, td
  border: 1px solid #aaa
  border-collapse: collapse
  padding: 3px 5px
  
table
  width: 95%
  margin: 1em auto
th
  background: #e6f9ff
tr:nth-child(even)
  background: rgba(#6cffd1,.2)
  
@media only screen and (max-width:768px)
  thead
    display: none
  td
    display: block
    padding: .3rem .5rem
  td:before
    content: attr(data-title)
    display: inline-block
    width: auto
    min-width: 20%
    font-weight: 900
    padding-right: 1rem
    
    
              
            
!

JS

              
                
              
            
!
999px

Console