I have used this bunch of code, which works perfect, but I am unable to add transition when showing/hiding more content. Can somebody please tell me how can I do that? I would like to use pure CSS, no JS. Thanks all in forward!
.showMore{
font-size: 14px;
display:block;
text-decoration: underline;
cursor: pointer;
}
.showMore + input{
display:none;
}
.showMore + input + *{
display:none;
}
.showMore + input:checked + *{
display:block;
}
<label class="showMore" for="_1">Heading 1</label>
<input id="_1" type="checkbox">
<div>Hidden 1</div>
<label class="showMore" for="_2">Heading 2</label>
<input id="_2" type="checkbox">
<div>Hidden2</div>
Live demo: http://jsbin.com/xufepopume/edit?html,css,js,output