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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class="table-wrap">
  <table>
    <thead>
      <tr>
        <th>名前</th>
        <th>価格</th>
        <th>説明</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>パソコン</td>
        <td>123000円</td>
        <td>めっちゃ使う。仕事道具であり遊び道具。</td>
      </tr>
      <tr>
        <td>スマホ</td>
        <td>98000円</td>
        <td>Twitterを見るだけの機械。推しにいいねを押すために存在してる。</td>
      </tr>
      <tr>
        <td>タブレット</td>
        <td>59800円</td>
        <td>仕事中にYouTubeを垂れ流すだけの機械。集中するときは音楽再生機。</td>
      </tr>
      <tr>
        <td>真空タンブラー</td>
        <td>2000円</td>
        <td>めっちゃ保温する。キンキンに冷えた飲み物を飲んでお腹壊すを繰り返す。</td>
      </tr>
      <tr>
        <td>顔面クリーム</td>
        <td>2500円</td>
        <td>朝シャーと夜の風呂後に、顔面にとにかく塗る。</td>
      </tr>
      <tr>
        <td>アクリルスタンド</td>
        <td>1500円</td>
        <td>推しのアクリルスタンド。増えるの幸せ。</td>
      </tr>
      <tr>
        <td>チェキ帳</td>
        <td>320円</td>
        <td>入れ物自体は安いが、中身は高額。でもこれが推しと俺との思い出が形となった宝物。</td>
      </tr>
    </tbody>
  </table>
</div>
              
            
!

CSS

              
                .table-wrap {
  max-height: 280px;
  margin: 32px;
  overflow: scroll;
  border: solid 1px #333;
  border-width: 1px 0 1px 1px;
}
table {
  position: relative;
  width: 100%;
  text-align: center;
  // border-collapse: collapse;
  border-spacing: 0;
}
thead {
  position: sticky;
  top:0;
}
tr {
  &:last-child {
    td {
      border-bottom: 0;
    }
  }
}
th {
  padding: 16px;
  background: #cae2f5;
  border: solid 1px #333;
  border-width: 0 1px 1px 0;
}
td {
  padding: 16px;
  border: solid 1px #333;
  border-width: 0 1px 1px 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console