Result こういうやつです。割と今更感な内容ですが書いてなかった気がするので 例によってinputと:checkedを使います css.gallery {/*親*/ display: flex; margin: 10px auto; max-width: 600px; position: relative; padding-top: 66.6666666667%; } .gallery__img {/*表示される大きな画像。エフェクト付き*/ position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.3s ease-in-out; } .gallery__thumb {/*サムネイル*/ padding-top: 6px; margin: 6px; display: block; } .gallery_
![CSSだけでサムネイルをクリックすると画像が切り替わるイメージギャラリー](https://cdn-ak-scissors.b.st-hatena.com/image/square/b6b1c87ada2ad66409793e3653c810e333009609/height=288;version=1;width=512/http%3A%2F%2Fkachibito.net%2Fwp-content%2Fuploads%2F2019%2F12%2Fsite-icon.png)