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

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="container">
  <div class="panel-group" id="buffy-stuff-accordion-group">
    <div class="panel">
      <div class="panel-heading" data-toggle="collapse" data-parent="#buffy-stuff-accordion-group" href="#buffy-characters-body">
        <h4>Characters</h4>
        <i class="fa fa-chevron-circle-down fa-lg pull-right"></i>
      </div> <!-- panel-heading -->
      <div class="collapse in" id="buffy-characters-body">
        <div class="panel-body">
          <ul class="character-list">
            <li class="character-item">Buffy Summers</li>
            <li class="character-item">Willow Rosenberg</li>
            <li class="character-item">Xander Harris</li>
            <li class="character-item">Rupert Giles</li>
          </ul> <!-- character-list -->
        </div> <!-- panel-body -->
      </div> <!-- collapse -->
    </div> <!-- panel -->
    <div class="panel">
      <div class="panel-heading collapsed" data-toggle="collapse" data-parent="#buffy-stuff-accordion-group" href="#buffy-episodes-body">
        <h4>Top Episodes</h4>
        <i class="fa fa-chevron-circle-down fa-lg pull-right"></i>
      </div> <!-- panel-heading -->
      <div class="collapse" id="buffy-episodes-body">
        <div class="panel-body">
          <ul class="episode-list">
            <li class="episode-item">Once More, With Feeling - S06E07</li>
            <li class="episode-item">The Body - S05E16</li>
            <li class="episode-item">Hush - S04E10</li>
            <li class="episode-item">Fool For Love - S05E07</li>
          </ul> <!-- episode-list -->
        </div> <!-- panel-body -->
      </div> <!-- collapse -->
    </div> <!-- panel -->
    <div class="panel">
      <div class="panel-heading collapsed" data-toggle="collapse" data-parent="#buffy-stuff-accordion-group" href="#buffy-creator-body">
        <h4>Creator</h4>
        <i class="fa fa-chevron-circle-down fa-lg pull-right"></i>
      </div> <!-- panel-heading -->
      <div class="collapse" id="buffy-creator-body">
        <div class="panel-body">
          <p><strong>Joss Whedon</strong> is an American screenwriter, film and television director, film and television producer, comic book author, and composer. He is the founder of Mutant Enemy Productions and co-founder of Bellwether Pictures, and is best known as the creator of the television series Buffy the Vampire Slayer.</p>
          <p>Also by Joss Wheedon: Angel, Firefly, Dollhouse, Agents of S.H.I.E.L.D., Cabin in the Woods</p>
          <p>Born: June 23, 1964 in NYC, NY, USA</p>
        </div> <!-- panel-body -->
      </div> <!-- collapse -->
    </div> <!-- panel -->
    <div class="panel">
      <div class="panel-heading collapsed" data-toggle="collapse" data-parent="#buffy-stuff-accordion-group" href="#buffy-trivia-panel">
        <h4>Trivia</h4>
        <i class="fa fa-chevron-circle-down fa-lg pull-right"></i>
      </div> <!-- panel-heading -->
      <div class="collapse" id="buffy-trivia-panel">
        <div class="panel-body">
          <ul class="trivia-list">
            <li class="trivia-item">Entertainment Weekly magazine named Buffy the number 3 character of all time, coming behind Homer Simpson and Harry Potter. (issue #1105/1106, June 4/11, 2010).</li>
            <li class="trivia-item">It cost $5000 to "dust" a vamp using computer graphics</li>
            <li class="trivia-item">Willow was recast after the pilot was shot</li>
            <li class="trivia-item">The library is stocked with all real books.</li>
          </ul> <!-- trivia-list -->
        </div> <!-- panel-body -->
      </div> <!-- collapse -->
    </div> <!-- panel -->
  </div> <!-- buffy-list-panel-group panel-group -->
</div> <!-- container -->
              
            
!

CSS

              
                body {
  background: #8eb386;
}

.container {
  margin-top: 30px;
}

@media (max-width: 767px) {
  .container {
    margin-top: 15px;
  }
}

.panel-heading {
  h4, i {
  display: inline-block;
  padding: 5px;
  margin: 0px;
  }
  i {
    margin: 4px;
    -webkit-transition: 0.25s ease-in-out;
    -moz-transition: 0.25s ease-in-out;
    transition: 0.25s ease-in-out;
  }
  &.collapsed i {
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    transform: rotate(-90deg);
  }
}

.panel-body p {
  margin-left: 10px;
}
              
            
!

JS

              
                
              
            
!
999px

Console