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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="row text-center">
    <div class="col-12">
      <div class="card">
        <div class="card-header">
          <h1>Collapse example</h1>
        </div>
        <div class="card-body">
          <button class="btn btn-info" type="button" onclick="return btnChangeTxt(this);" data-toggle="collapse" data-target="#CollapseExample" aria-expanded="false" aria-controls="CollapseExample">Show content
          </button>
          <div class="row">
            <div class="col">
              <div class="collapse multi-collapse" id="CollapseExample">
                <div class="card card-body mt-2">
                  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem
                  Ipsum has been the industry's standard dummy text ever since the 1500s, when an
                  unknown printer took a galley of type and scrambled it to make a type specimen book.
                  It has survived not only five centuries, but also the leap into electronic
                  typesetting, remaining essentially unchanged. It was popularised in the 1960s with
                  the release of Letraset sheets containing Lorem Ipsum passages, and more recently
                  with desktop publishing software like Aldus PageMaker including versions of Lorem
                  Ipsum.
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                body {
  background-color: #1d2d50;
}

.card-body {
  border: 1px solid rgba(7, 23, 74, 0.07);
}

              
            
!

JS

              
                function btnChangeTxt(el) {
  if (el.innerHTML === "Hide content") el.innerHTML = "Show content";
  else el.innerHTML = "Hide content";
}

              
            
!
999px

Console