Skip to main content
Bluvy Tube
Press Esc to exit fullscreen
Volume m
/
i
Theater mode t
f
/
Placing items in a circle used to require JavaScript trigonometry. Now you can build a circular gallery using CSS only. Here is how to do it in 5 simple steps. #CSS #WebDev #Frontend 1/6

Keyboard shortcuts

Space K
Play / pause
← →
Back / forward 5 s
J L
Back / forward 10 s
0–9
Jump to 0%–90% of the video
Home End
Start / end
, .
Previous / next frame (while paused)
< >
Slower / faster
↑ ↓
Volume
M
Mute / unmute
C
Captions
F
Fullscreen
I
Picture-in-picture
T
Theater mode
?
Show this help

Placing items in a circle used to require JavaScript trigonometry. Now you can build a circular gallery using CSS only. Here is how to do it in 5 simple steps. #CSS #WebDev #Frontend 1/6

0 views Published on 06/11/2026 21:00 0:13
Placing items in a circle used to require JavaScript trigonometry. Now you can build a circular gallery using CSS only. Here is how to do it in 5 simple steps. #CSS #WebDev #Frontend 1/6
1 comment
?
1. The math setup and star layout.

CSS variables define the number of items and offset distance.
Rotate the container based on the item index.
Then push each item outward with translateX.
This creates a perfect circle layout.

2/6
2. The ghost wrapper strategy.

Moving an item on hover can break the hover state.
This problem causes annoying flickering.
To fix this keep the parent item on the circle.
Animate only the child element visually on hover.

3/6
View original post on Bluesky
Link copied to clipboard

Sign in

Time to take a break

You've been watching videos for 30 minutes straight: give yourself 5 minutes away from the screen. Stand up, stretch, grab a glass of water… Your videos will be right here when you're back.