Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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 lang="ja">

<div>
  <img src="https://accessible-usable.net/images/200613.png" alt="地域ごとの発生件数推移 (2015年 - 2019年)">
</div>

<details>
  <summary>
    <span><i class="fas fa-angle-right" aria-hidden="true"></i></span>
    データ一覧の表示
  </summary>
  <div class="scrollable-table">
    <table>
      <thead>
        <tr><th>発生エリア</th><th>2015</th><th>2016</th><th>2017</th><th>2018</th><th>2019</th></tr>
      </thead>
      <tbody>
        <tr><td>A 地域</td><td>12</td><td>17</td><td>26</td><td>53</td><td>96</td></tr>
        <tr><td>B 地域</td><td>40</td><td>55</td><td>43</td><td>70</td><td>58</td></tr>
        <tr><td>C 地域</td><td>15</td><td>10</td><td>23</td><td>99</td><td>45</td></tr>
      </tbody>
    </table>
  </div>
  <p><small>参考 : <a href="#">出典名</a></small></p>
</details>

</div><!-- end lang="ja" -->
              
            
!

CSS

              
                /*<details> と <summary> のスタイリング*/

summary{
  display:inline-block; /*Firefox でデフォルトの summary マーカーを消す。*/
  cursor:pointer; /*summary 要素上で hover するとマウスポインターが「Iビーム」になるので、「人差し指」に変更する。*/
  padding:10px;
}

summary::-webkit-details-marker {
  display: none; /*Firefox 以外でデフォルトの summary マーカーを消す。*/
}

details summary i{
  transition: .3s;
}

details[open] summary i{
  transform: rotate(90deg);
}

/*その他のスタイリング*/

img{
  width:600px;
  max-width:98%;
  border:3px #cccccc solid;
}

div.scrollable-table{
  overflow: auto;
  white-space: nowrap;
} 

table{
  border-collapse: collapse;
}

table th, table td{
  border:1px #000000 solid;
  padding:1em;
}

/*Edge および IE11 では、折り畳み/展開のインタラクションができないので、summary 要素内のマーカーアイコン (クリックできそうに見える手がかり) を消す。また、summary 要素上のマウスポインターをデフォルトに戻す。*/

@supports (-ms-ime-align:auto) {
  summary span{display:none;}
  summary{cursor:auto;}
}

@media all and (-ms-high-contrast:none) {
  *::-ms-backdrop,
  summary span{display:none;}
  summary{cursor:auto;}
}
              
            
!

JS

              
                
              
            
!
999px

Console