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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="show-hide">
  <h2>Show / Hide Paragraphs</h2>
  <input type="checkbox" class="read-more-state" id="visible" />
  <div class="read-more-wrap">
    <p><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin quis mattis libero. Nulla tincidunt quam sed purus hendrerit placerat. Ut a porttitor odio. Sed feugiat arcu quis tincidunt feugiat. Donec aliquam aliquet nibh eget luctus. Nunc eget neque non massa pulvinar efficitur fringilla quis augue. Donec vel tempus lacus. Pellentesque aliquet felis nisl, eget finibus velit volutpat vitae. Ut tincidunt dapibus nunc ac euismod. Nulla urna neque, porttitor sit amet arcu sed, dignissim sodales mauris. Proin quis ante nec eros mollis bibendum quis ac ex. Vestibulum tempus justo dui, ut venenatis felis pellentesque non. Etiam cursus imperdiet elit, hendrerit cursus risus pharetra et. Cras accumsan venenatis arcu at pulvinar. Quisque tristique nisl id lobortis sodales. Duis ornare metus nec justo rutrum, in convallis turpis cursus. </p>
    
    <p class="read-more-target"><br>Phasellus vel interdum enim, et vehicula mi. Interdum et malesuada fames ac ante ipsum primis in faucibus. Praesent auctor efficitur ornare. Vestibulum hendrerit in diam ac imperdiet. Nulla maximus neque eget est hendrerit, quis volutpat ex semper. Nulla odio risus, vulputate sed leo et, luctus malesuada eros. Etiam et mauris nec dui vulputate feugiat nec et sapien. Ut sollicitudin mi quis justo viverra, eget dignissim velit congue. Curabitur lobortis, arcu et dapibus ullamcorper, magna tellus viverra leo, eu suscipit dui erat at sem. </p>
  </div>
  <label for="visible" class="read-more-trigger"></label>
</div>
              
            
!

CSS

              
                .show-hide {
  text-align:center;
}
.read-more-wrap {
  opacity:1;
  -moz-transition: opacity 0.4s ease-in-out;
    -o-transition: opacity 0.4s ease-in-out;
    -webkit-transition: opacity 0.4s ease-in-out;
    transition: opacity 0.4s ease-in-out;
}
.show-hide p {
  margin-top:15px;
  max-width:800px;
  margin:0 auto;
  text-align:left;
}
.read-more-state {
  display: none;

}

.read-more-target {
  margin-top:2rem;
  opacity: 0;
  max-height: 0;
  font-size: 0;
  -moz-transition: opacity 0.4s ease-in-out;
    -o-transition: opacity 0.4s ease-in-out;
    -webkit-transition: opacity 0.4s ease-in-out;
    transition: opacity 0.4s ease-in-out;
}

.read-more-state:checked ~ .read-more-wrap .read-more-target {
  opacity: 1;
  font-size: inherit;
  max-height: 999em;
}

.read-more-state ~ .read-more-trigger:before {
  content: 'Read More';
}

.read-more-state:checked ~ .read-more-trigger:before {
  content: 'Read Less';
}

.read-more-trigger {
  cursor: pointer;
  display: inline-block;
  padding: 0 .5em;
  color: #666;
  font-size: .9em;
  line-height: 2;
  border: 1px solid #ddd;
  border-radius: .25em;
  margin-top:15px;
  margin-bottom:15px;
}
.read-more-trigger:hover {
  background:#666;
  color:white;
}

              
            
!

JS

              
                
              
            
!
999px

Console