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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

            
              <section class="ac-container-MXH">
  Max-Height
  <div>
    <input id="ac-1" name="accordion" type="radio" checked="">
    <label for="ac-1">About us</label>
    <article >
      <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make
        shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make
        one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make one show. That show's
        called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make one show. That show's called a pilot. Then
        they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows.
      </p>
    </article>
  </div>
  <div>
    <input id="ac-2" name="accordion" type="radio">
    <label for="ac-2">How we work</label>
    <article >
      <p>Like you, I used to think the world was this great place where everybody lived by the same standards I did, then some kid with a nail showed me I was living in his world, a world where chaos rules not order, a world where righteousness is not rewarded.
        That's Cesar's world, and if you're not willing to play by his rules, then you're gonna have to pay the price. </p>
    </article>
  </div>
  <div>
    <input id="ac-3" name="accordion" type="radio">
    <label for="ac-3">References</label>
    <article >
      <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each
        other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle
        to man. </p>
    </article>
  </div>
  <div>
    <input id="ac-4" name="accordion" type="radio">
    <label for="ac-4">Contact us</label>
    <article >
      <p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole
        does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic.
      </p>
    </article>
  </div>
</section>
<section class="ac-container-SC0">
  Mix of Max-Height and translateY
  <div>
    <input id="ac-2-1" name="accordion" type="radio" checked="">
    <label for="ac-2-1">About us</label>
    <article >
      <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make
        shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make
        one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make one show. That show's
        called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make one show. That show's called a pilot. Then
        they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows.
      </p>
    </article>
  </div>
  <div>
    <input id="ac-2-2" name="accordion" type="radio">
    <label for="ac-2-2">How we work</label>
    <article >
      <p>Like you, I used to think the world was this great place where everybody lived by the same standards I did, then some kid with a nail showed me I was living in his world, a world where chaos rules not order, a world where righteousness is not rewarded.
        That's Cesar's world, and if you're not willing to play by his rules, then you're gonna have to pay the price. </p>
    </article>
  </div>
  <div>
    <input id="ac-2-3" name="accordion" type="radio">
    <label for="ac-2-3">References</label>
    <article >
      <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each
        other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle
        to man. </p>
    </article>
  </div>
  <div>
    <input id="ac-2-4" name="accordion" type="radio">
    <label for="ac-2-4">Contact us</label>
    <article >
      <p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole
        does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic.
      </p>
    </article>
  </div>
</section>
<section class="ac-container-MIX">
  Mix of Max-Height and Scale(0)
  <div>
    <input id="ac-3-1" name="accordion" type="radio" checked="">
    <label for="ac-3-1">About us</label>
    <article >
      <p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make
        shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make
        one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make one show. That show's
        called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Well, the way they make shows is, they make one show. That show's called a pilot. Then
        they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows.
      </p>
    </article>
  </div>
  <div>
    <input id="ac-3-2" name="accordion" type="radio">
    <label for="ac-3-2">How we work</label>
    <article >
      <p>Like you, I used to think the world was this great place where everybody lived by the same standards I did, then some kid with a nail showed me I was living in his world, a world where chaos rules not order, a world where righteousness is not rewarded.
        That's Cesar's world, and if you're not willing to play by his rules, then you're gonna have to pay the price. </p>
    </article>
  </div>
  <div>
    <input id="ac-3-3" name="accordion" type="radio">
    <label for="ac-3-3">References</label>
    <article >
      <p>You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each
        other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle
        to man. </p>
    </article>
  </div>
  <div>
    <input id="ac-3-4" name="accordion" type="radio">
    <label for="ac-3-4">Contact us</label>
    <article >
      <p>You see? It's curious. Ted did figure it out - time travel. And when we get back, we gonna tell everyone. How it's possible, how it's done, what the dangers are. But then why fifty years in the future when the spacecraft encounters a black hole
        does the computer call it an 'unknown entry event'? Why don't they know? If they don't know, that means we never told anyone. And if we never told anyone it means we never made it back. Hence we die down here. Just as a matter of deductive logic.
      </p>
    </article>
  </div>
</section>
            
          
!
            
              /*Acco*/
.ac-container-MXH, .ac-container-SC0, .ac-container-MIX {
    max-width: 320px;
    float:left;
}

.ac-container-MXH label, .ac-container-SC0 label, .ac-container-MIX label {
    height: 30px !important;
    line-height: 21px !important;
    font-size: 12px !important;
    font-family: 'Open Sans','Arial Narrow',Arial,sans-serif !important;
    padding: 5px 20px;
    position: relative;
    z-index: 20;
    display: block;
    height: 30px;
    cursor: pointer;
    color: #777;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    line-height: 33px;
    font-size: 19px;
    background: #fff;
    background: -moz-linear-gradient(top,#fff 1%,#eaeaea 100%);
    background: -webkit-gradient(linear,left top,left bottom,color-stop(1%,#fff),color-stop(100%,#eaeaea));
    background: -webkit-linear-gradient(top,#fff 1%,#eaeaea 100%);
    background: -o-linear-gradient(top,#fff 1%,#eaeaea 100%);
    background: -ms-linear-gradient(top,#fff 1%,#eaeaea 100%);
    background: linear-gradient(top,#fff 1%,#eaeaea 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff',endColorstr='#eaeaea',GradientType=0 );
    box-shadow: 0 0 0 1px rgba(155,155,155,0.3),1px 0 0 rgba(255,255,255,0.9) inset,0 2px 2px rgba(0,0,0,0.1);
    font-size: 12px;
    height: 30px;
    line-height: 20px;
}

.ac-container-MXH, .ac-container-SC0, .ac-container-MIX {
    width: 100%;
    margin: 10px auto 30px auto;
    text-align: left;
}

.ac-container-MXH label:hover, .ac-container-SC0 label:hover, .ac-container-MIX label:hover {
    background: #fff;
}

.ac-container-MXH input:checked + label, .ac-container-SC0 input:checked + label, .ac-container-MIX input:checked + label,
.ac-container-MXH input:checked + label:hover, .ac-container-SC0 input:checked + label:hover, .ac-container-MIX input:checked + label:hover {
    background: #f1f2f3;
    color: #666;
    text-shadow: 0 1px 1px rgba(255,255,255,0.6);
    box-shadow: 0 0 0 1px rgba(155,155,155,0.3),0 2px 2px rgba(0,0,0,0.1);
    height: 30px;
    line-height: 21px;
    font-size: 13px;
}

.ac-container-MXH label:hover:after, .ac-container-SC0 label:hover:after, .ac-container-MIX label:hover:after,
.ac-container-MXH input:checked + label:hover:after, .ac-container-SC0 input:checked + label:hover:after, .ac-container-MIX input:checked + label:hover:after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    right: 13px;
    top: 7px;
    background: transparent url(../images/arrow_down.png) no-repeat center center;
}

.ac-container-MXH input:checked + label:hover:after, .ac-container-SC0 input:checked + label:hover:after, .ac-container-MIX input:checked + label:hover:after {
    background-image: url(../images/arrow_up.png);
}

.ac-container-MXH input, .ac-container-SC0 input, .ac-container-MIX input {
    display: none;
}

.ac-container-MXH article{
    max-height: 0;

    background: rgba(255,255,255,0.5);
    margin-top: -1px;
    overflow: hidden;
    position: relative;
    z-index: 10;
    -webkit-transition: max-height 0.3s ease-in-out,box-shadow 0.6s linear;
    -moz-transition: max-height 0.3s ease-in-out,box-shadow 0.6s linear;
    -o-transition: max-height 0.3s ease-in-out,box-shadow 0.6s linear;
    -ms-transition: max-height 0.3s ease-in-out,box-shadow 0.6s linear;
    transition: max-height 0.3s ease-in-out,box-shadow 0.6s linear;
}
.ac-container-SC0 article{
		translateY(-100%);
    max-height:0;

    background: rgba(255,255,255,0.5);
    margin-top: -1px;
    overflow: hidden;
    position: relative;
    z-index: 10;
    -webkit-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    -moz-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    -o-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    -ms-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
}
.ac-container-MIX article {
    transform: scaleY(0);
		transform-origin: top;
    max-height: 0;

    background: rgba(255,255,255,0.5);
    margin-top: -1px;
    overflow: hidden;
    position: relative;
    z-index: 10;
    -webkit-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    -moz-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    -o-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    -ms-transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
    transition: all 0.5s ease-in-out,box-shadow 0.6s linear;
}

.ac-container-MXH article p, .ac-container-SC0 article p, .ac-container-MIX article p {
    font-style: normal;
    color: #777;
    line-height: 23px;
    font-size: 10px;
    padding: 20px;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
    font: normal normal 12px 'Open Sans';
}

.ac-container-MXH input:checked ~ article{
    -webkit-transition: max-height 0.5s ease-in-out,box-shadow 0.1s linear;
    -moz-transition: max-height 0.5s ease-in-out,box-shadow 0.1s linear;
    -o-transition: max-height 0.5s ease-in-out,box-shadow 0.1s linear;
    -ms-transition: max-height 0.5s ease-in-out,box-shadow 0.1s linear;
    transition: max-height 0.5s ease-in-out,box-shadow 0.1s linear;
    box-shadow: 0 0 0 1px rgba(155,155,155,0.3);
}
.ac-container-SC0 input:checked ~ article{
    -webkit-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    -moz-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    -o-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    -ms-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    box-shadow: 0 0 0 1px rgba(155,155,155,0.3);
}
.ac-container-MIX input:checked ~ article {
    -webkit-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    -moz-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    -o-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    -ms-transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    transition: all 0.5s ease-in-out,box-shadow 0.1s linear;
    box-shadow: 0 0 0 1px rgba(155,155,155,0.3);
}

.ac-container-MXH input:checked ~ article{
    max-height: 500px; 
}
.ac-container-SC0 input:checked ~ article{
		max-height: 500px;
}
.ac-container-MIX input:checked ~ article {
		transform: scaleY(1); 
    max-height: 500px;
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console