<div class="cp_cssslider02">
<input type="radio" name="cp_switch" id="photo1" checked/>
<label for="photo1"><img src="img1.jpg" /></label>
<img src="img1.jpg" />
<input type="radio" name="cp_switch" id="photo2"/>
<label for="photo2"><img src="img2.jpg" /></label>
<img src="img2.jpg" />
<input type="radio" name="cp_switch" id="photo3"/>
<label for="photo3"><img src="img3.jpg" /></label>
<img src="img3.jpg" />
<input type="radio" name="cp_switch" id="photo4"/>
<label for="photo4"><img src="img4.jpg" /></label>
<img src="img4.jpg" />
<input type="radio" name="cp_switch" id="photo5"/>
<label for="photo5"><img src="img5.jpg" /></label>
<img src="img5.jpg" />
</div>
.cp_cssslider02 {
width: 300px;
padding-top: 200px; /* 画像の高さ */
position: relative;
margin: 2em auto;
text-align: center;
}
.cp_cssslider02 > img {
position: absolute;
left: 0;
top: 0;
transition: all 0.5s;
border-radius: 3px;
box-shadow:0px 0px 5px 0px rgba(0,0,0,0.3);
}
.cp_cssslider02 input[name='cp_switch'] {
display: none;
}
/* サムネイル */
.cp_cssslider02 label {
margin: 15px 5px 0 5px;
border: 2px solid #ffffff;
display: inline-block;
cursor: pointer;
transition: all 0.5s ease;
opacity: 0.6;
border-radius: 3px;
padding: 0;
}
.cp_cssslider02 label:hover {
opacity: 0.9;
}
.cp_cssslider02 label img {
display: block;
width: 40px;
border-radius: 2px;
}
.cp_cssslider02 input[name='cp_switch']:checked + label {
border: 2px solid #FF7043;
opacity: 1;
}
.cp_cssslider02 input[name='cp_switch'] ~ img {
opacity: 0;
}
.cp_cssslider02 input[name='cp_switch']:checked + label + img {
opacity: 1;
}