cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <h1>animated plus-to-minus signs & CSS-only expandibles</h1>
<div class="acc-outer">
<input type="checkbox" class="acc-check" id="test1" name="test1" />
<label for="test1" class="acc-button"></label>
<div class="acc-content">
  <h2>you wanna read more about me</h2>
  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.</p>
<p>Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. </p>
  <p>sorry, nothing to read.</p>
  </div>
</div>
  
  
  <div class="acc-outer"> 
<input type="checkbox" class="acc-check" id="test2" name="test2" />
<label for="test2" class="acc-button"></label>
<div class="acc-content">
  <h2>no information is hidden here</h2>
  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.</p>

<p>In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.</p>

  <p>I told you nothing was here.</p>
  </div>
</div>
            
          
!
            
              $styleColor:#49d;

.acc-check {
  position: absolute;
  opacity:0;
}
.acc-button {
  background:#f4f4f4;
  display: inline-block;    
  position: relative;
  width:32px;
  height:32px;
  border-radius:4px;
  cursor:pointer;
  float:left;
  margin-right: 10px;
  border:1px solid #ccc; 
  box-shadow: 0 1px 2px #ccc inset;
  
  &:before {
    content:'';
    position: absolute;
    left:50%;
    top:50%;
    background:$styleColor;
    height:4px;
    width:16px; 
    margin-top:-2px;
    margin-left:-8px;
    border-radius:2px;
  }
  &:after {
    content:'';
    position: absolute;
    left:50%;
    top:50%;
    background:$styleColor;
    width:4px;
    height:16px;
    margin-left:-2px;
    margin-top:-8px;
    border-radius:2px;
    transition:transform 1s ease;
    transform:scaleY(1);
  } 
  .acc-check:checked ~ &:after {
      transform:scaleY(0);
  }
  .acc-check:focus ~ & {
    border-color:$styleColor;
  }
}
.acc-content {
  height:100px;
  overflow:hidden;
  width:300px;
  transition:height 1s ease;
  position: relative;
  text-align: left;
  
  &:after {
    position: absolute;
    bottom:0;
    left:0;right:0;
    content:'';
    height:50px;
    display: block;
    background:linear-gradient(to bottom, rgba(white,0%) 0%,white 100% );
  }
}
.acc-check:checked ~ .acc-content {
  height:600px;
  
  &:after {
    display: none;
  }
}
.acc-outer {
  display: inline-block;
  position: relative;
  vertical-align: top;
}

body {
  font:.9em sans-serif;
  text-align: center;
  overflow-y: scroll;
}
h1,h2,h3,h4,h5,h6 {
  font-family:Georgia,serif;
  margin:.25em 0;
}

p {
  margin:0 0 5px;
}
            
          
!
999px
Loading ..................

Console