← All elements
<div class="sl" role="img" aria-label="A swinging paper lantern"><div class="ln"><i></i></div></div>About this animation
A red paper lantern that sways from its cord and glows, with ribs and a tassel drawn by gradients.
How it works
The whole lantern hangs from a cord and rotates around the top centre, alternating between two angles. The paper ribs are a repeating radial gradient over a warm glow, the gold caps are pseudo-elements and the tassel is a striped box. A second animation breathes the glow.
Ways to customise it
- Change the 9 degree swing angle.
- Change the red and gold colours.
- Change the glow timing.
Good to know
It is decorative with a short image label. Large shadows that animate can use more power, so use only a few on one screen.
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.