Acordian without JS
by Bharat Soni
HTML
<form>
<ul>
<li>
<input id="rad1" type="radio" name="rad" checked="checked">
<label for="rad1">1</label>
<div class="accslide">
<h2>Slide 1</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing.</p>
<img src="http://lorempixum.com/420/200/city/1" alt="">
</div>
</li>
<li>
<input id="rad2" type="radio" name="rad">
<label for="rad2">2</label>
<div class="accslide">
<h2>Slide 2</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing.</p>
<img src="http://lorempixum.com/420/200/city/2" alt="">
</div>
</li>
<li>
<input id="rad3" type="radio" name="rad">
<label for="rad3">3</label>
<div class="accslide">
<h2>Slide 3</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent euismod ultrices ante, ac laoreet nulla vestibulum adipiscing.</p>
<img src="http://lorempixum.com/420/200/city/3" alt="">
</div>
</li>
</ul>
</form>
CSS
/*BASIC*/
* {
margin: 0;
padding: 0;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
background: #eee;
}
/*HEADER*/
.header {
height: 25px;
background: #222;
color: #eee;
text-align: center;
font: 10px/25px Helvetica, Verdana, sans-serif;
}
.header a {
color: #999;
}
/*LIST*/
ul {
list-style: none;
}
/*FORM*/
form {
margin: 50px;
}
input {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
display: block;
height: 330px;
width: 50px;
background-color: #38ADE2;
text-align: center;
font: 14px/50px Helvetica, Verdana, sans-serif;
margin-bottom: 10px;
float: left;
overflow: hidden;
-webkit-transition: width 1s ease, background 0.5s ease;
-moz-transition: width 1s ease, background 0.5s ease;
-o-transition: width 1s ease, background 0.5s ease;
-ms-transition: width 1s ease, background 0.5s ease;
transition: width 1s ease, background 0.5s ease;
}
#rad2 + label {
background-color: #38ADE2;
border-left:1px solid #1983B3;
border-right:1px solid #1983B3;
-webkit-transition: width 1s ease, background 0.5s ease;
-moz-transition: width 1s ease, background 0.5s ease;
-o-transition: width 1s ease, background 0.5s ease;
-ms-transition: width 1s ease, background 0.5s ease;
transition: width 1s ease, background 0.5s ease;
}
#rad1 + label{border-right:1px solid #66D0E8;}
#rad3 + label{border-left:1px solid #66D0E8;}
label:hover, #rad2 + label:hover {
background: #1983B3;
color: #fff;
cursor: pointer;
}
/*SLIDES*/
.accslide {
color: #333;
display: block;
height: 330px;
width: 0px;
background: #fff;
font: 12px/1.5 Helvetica, Verdana, sans-serif;
padding: 10px 0;
float: left;
overflow: hidden;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
.accslide p, h2, img {
width: 420px;
padding-left:...