Pen Settings



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


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


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.


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.


                <div class="details">
	<input type="checkbox" id="menu01">
	<label class="details__summary" for="menu01">チェックボックスによるアコーディオン</label>
	<div class="details__content">チェックボックスのオンオフで開閉を切り替えます。</div>

	<input type="checkbox" id="menu02">
	<label class="details__summary" for="menu02">HTML+CSSのみで実現</label>
	<div class="details__content">Javascriptは使わずCSSのみでアニメーションさせています。</div>

	<input type="checkbox" id="menu03" checked>
	<label class="details__summary" for="menu03">開閉の仕組み</label>
	<div class="details__content">CSSの兄弟要素を使ってアニメーションさせる要素を指定しています。</div>


                .details {
  line-height: 2;
  color: #7E4828;
  width: 80%;
  margin: 50px auto 100px;
  & input[type=checkbox] {
    display: none;
  &__summary {
    position: relative;
    display: block;
    cursor: pointer;
    background: #FFF9F3;
    border: 1px solid #F9D6B2;
    margin: 20px 0 0;
    padding: 10px 40px 10px 16px;
    &:first-child {
      margin-top: 0;
    &::before {
      display: block;
      content: "";
      box-sizing: border-box;
      position: absolute;
      top: calc(50% - 6px);
      right: 16px;
      width: 6px;
      height: 6px;
      border: 6px solid transparent;
      border-left: 6px solid #7E4828;
      transition: all 0.4s ease-out;
      transform-origin: 3px 6px;
      transform: rotate(90deg);
      input[type=checkbox]:checked + & {
        transform: rotate(-90deg);
  &__content {
    overflow: hidden;
    transition: line-height 0.4s ease-out 0s, padding 0.4s ease-out 0s, opacity 0.6s 0.3s;
    line-height: 0;
    border: 1px solid #F9D6B2;
    border-top: none;
    opacity: 0;
    margin: 0;
    padding: 0 16px;
    input[type=checkbox]:checked + .details__summary + & {
      line-height: 2;
      opacity: 1;
      padding: 16px;