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

              
                <!-- タブメニュー -->
<input type="radio" name="tab_item" id="tab_radio_A" class="tab_radio" checked>
<label for="tab_radio_A" class="tab_menu">HTMLとは</label>

 <input type="radio" name="tab_item" id="tab_radio_B" class="tab_radio">
<label for="tab_radio_B" class="tab_menu">CSSとは</label>

<input type="radio" name="tab_item" id="tab_radio_C" class="tab_radio">
<label for="tab_radio_C" class="tab_menu">JavaScriptとは</label>

  <!-- タブA 表示内容 -->
<div id="tab_contains_A" class="tab_contains">
  <p>HTMLは、コンピュータが理解できる文章構造を作ります。</p>
</div>

  <!-- タブB 表示内容 -->
<div id="tab_contains_B" class="tab_contains">
  <p>CSSは、HTML文章の見た目にデザインを指定していきます。</p>
</div>

  <!-- タブC 表示内容 -->
<div id="tab_contains_C" class="tab_contains">
  <p>JavaScriptは、ユーザーの動きに反応したり、複雑なことをします。</p>
</div>

              
            
!

CSS

              
                

.tab_radio{
  /*ラジオボタンは表示しない*/
  display:none;
}
.tab_menu{
  /*タブの基本スタイル*/
  border: solid black;
  border-width:1px 1px 0 1px;
  border-radius:3px 3px 0 0;
  margin: 0 2px;
  padding:0 3px;
  width:29%;
  display:inline-block;
  /*選択されていないタブは透明色*/
  background-color:transport;
}

.tab_radio:checked + .tab_menu{
  /*選択されているタブは白背景*/
  /* タブコンテンツの上線にかぶせて隠す */
  background-color:white;
}

.tab_contains{
  /*コンテンツの基本スタイル*/
  width:90%;
  border: solid black 1px;
  border-radius:3px;
  padding:1rem;
  /*選択されたタブで上線をかぶせる*/
  margin-top:-1px;
  background-color:white;
  /*選択されていないコンテンツは非表示*/
  display:none;
}

#tab_radio_A:checked ~ #tab_contains_A,
#tab_radio_B:checked ~ #tab_contains_B,
#tab_radio_C:checked ~ #tab_contains_C{
  display:block;
}
              
            
!

JS

              
                
              
            
!
999px

Console