← All elements

Thumbnail Gallery Switcher

by @admin · 0 views

<div class="tgs"><input type="radio" name="tgs" id="tg1" checked><input type="radio" name="tgs" id="tg2"><input type="radio" name="tgs" id="tg3"><div class="v"><i class="p1"></i><i class="p2"></i><i class="p3"></i></div><div class="th"><label for="tg1" class="p1">Dawn</label><label for="tg2" class="p2">Noon</label><label for="tg3" class="p3">Night</label></div></div>

About this carousel

A main picture area with thumbnail buttons below, crossfading between scenes painted entirely with gradients.

How it works

Three radios come before the viewer and the thumbnail row. Sibling selectors show the matching scene by raising its opacity and outline the chosen thumbnail. The dawn, noon and night pictures are layered radial and linear gradients, so no image files are needed.

Ways to customise it

  • Replace the gradient classes with your own background images.
  • Change the 0.5s crossfade.
  • Add a fourth radio, scene and label together.

Good to know

If you use photos that carry meaning, describe them in text, because background images have no alternative text. Focus is shown on the thumbnail of the focused radio.

Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.

More in Carousel

View all →