CSS Only Accordion

Accordion with CSS3 only. Works with most browsers.

Demo

The HTML

<section class="a_container">
 <div>
  <input id="a_1" name="ac-1" type="radio">
   <label for="a_1">Box 01</label>
   <article class="a-small">
   <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.</p>
   </article>
</div>

<div>
   <input id="ac_2" name="ac-1" type="radio" checked>
   <label for="ac_2">Box 02</label>
   <article class="a-medium">
   <p>Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. 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.</p>
</article>
</div>

<div>
   <input id="ac_3" name="ac-1" type="radio">
   <label for="ac_3">Box 03</label>
   <article class="a-large">
   <p>Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. </p>
   </article>
   </div>
</section>

The CSS

.a_container{
width: 450px;
margin: 20px auto;
text-align: left;
}
.a_container label{
padding: 8px 22px;
position: relative;
z-index: 25;
display: block;
height: 36px;
cursor: pointer;
color: #3a3a3a;
line-height: 39px;
font-size: 18px;
background: #e5e5e5;
}

.a_container label:hover{
background: #eee;
}

.a_container input:checked + label,
.a_container input:checked + label:hover{
background: #404040;
color: #fff;
}

.a_container label:hover:after,
.a_container input:checked + label:hover:after{
content: '';
position: absolute;
width: 24px;
height: 24px;
right: 15px;
top: 15px;
background: transparent url(http://code-snippet-blog.dennispollack.de/wp-content/uploads/2012/07/arrow_down.png) no-repeat center center;	
}

.a_container input:checked + label:hover:after{
background-image: url(http://code-snippet-blog.dennispollack.de/wp-content/uploads/2012/07/arrow_up.png);
}

.a_container input{
display: none;
}

.a_container article{
background: #ffffff;
margin-top: -1px;
overflow: hidden;
height: 0px;
position: relative;
z-index: 15;
-webkit-transition: height 0.5s ease-in-out;
-moz-transition: height 0.5s ease-in-out;
-o-transition: height 0.5s ease-in-out;
-ms-transition: height 0.5s ease-in-out;
transition: height 0.5s ease-in-out;
}

.a_container article p{
font-size: 11px;
line-height: 14px;
color: #777;
padding: 15px 20px;
}

.a_container input:checked ~ article{
-webkit-transition: height 0.5s ease-in-out;
-moz-transition: height 0.5s ease-in-out;
-o-transition: height 0.5s ease-in-out;
-ms-transition: height 0.5s ease-in-out;
transition: height 0.5s ease-in-out;
border-left: #eee solid 1px;
border-right: #eee solid 1px;
border-bottom: #eee solid 1px;
}

.a_container input:checked ~ article.a-small{
height: 150px;
}
.a_container input:checked ~ article.a-medium{
height: 200px;
}
.a_container input:checked ~ article.a-large{
height: 250px;
}

Source