Carouhell - Turning any list into carouhell

Back to Carouhell

You can see an ordinary list. Click on the image to turn it into carousel. See the onclick in code below.

<link rel="stylesheet" type="text/css" href="src/carouhell.css"> <script src="src/carouhell.js"></script> <style> .carouhell { width: 400px; height: 400px; background: gray; } .carouhell li { transition: 400ms; } ul, img { max-width: 100%; box-sizing: border-box; } </style> <ul onclick="carouhell(this);this.removeAttribute('onclick')"> <li><img src="assets/img1.jpg"> <li><img src="assets/img2.jpg"> </ul>