Ich würde ja eher eine Galerie empfehlen, die durch Klick bedient wird, damit sie auch auf Touch-Geräten funktioniert. Diese habe ich früher mal gemacht:
Code
<style>
.thumbs {
display: inline-block;
width: 50px;
vertical-align: top;
}
.thumbs img {
width: 50px;
height: auto;
}
.mainimg {
position: relative;
display: inline-block;
height: 400px;
width: calc(100% - 50px);
}
.mainimg input {
display: none;
}
.mainimg figure {
position: absolute;
width: 100%;
height: auto;
left: 0;
top: 0;
opacity: 0;
transition: opacity ease 3s;
}
.mainimg figure img {
width: 70%;
height: auto;
float: left;
}
.mainimg figure figcaption {
display: inline;
}
.mainimg input:checked + figure {
display: block;
opacity: 1;
}
</style>
<div class="thumbs">
<label for="img1"><img src="images/dia0.jpg" /></label>
<label for="img2"><img src="images/dia1.jpg" /></label>
<label for="img3"><img src="images/dia2.jpg" /></label>
</div><div class="mainimg">
<input type="radio" name="radio-mainimg" id="img1" />
<figure><img src="images/dia0.jpg" /><figcaption>Caption for image 1</figcaption></figure>
<input type="radio" name="radio-mainimg" id="img2" checked />
<figure><img src="images/dia1.jpg" /><figcaption>Caption for image 2</figcaption></figure>
<input type="radio" name="radio-mainimg" id="img3" />
<figure><img src="images/dia2.jpg" /><figcaption>Caption for image 3</figcaption></figure>
</div>
Alles anzeigen
Edit: Ich sehe, dass die Galerie von Gipspferd das auch realisiert, mit :focus. Nehme alles zurück.