How to make those hexagons and its background with css

I was watching a youtube short and i thought how to make those hexagons and its background image with css https://www.youtube.com/shorts/IDYVZT3Jwzk?feature=share
7 Replies
Joao
Joao14mo ago
Did you come up with something?
Sheikh Barkotullah
Sheikh BarkotullahOP14mo ago
no
roelof
roelof14mo ago
Temani Afif
CSS-Tricks
Hexagons and Beyond: Flexible, Responsive Grid Patterns, Sans Media...
A little while back, Chris shared this nice hexagonal grid. And true to its name, it’s using —wait for it — CSS Grid to form that layout. It’s a neat trick!
Sheikh Barkotullah
Sheikh BarkotullahOP14mo ago
but how to give all of those hexagons same image as background?
Joao
Joao14mo ago
That's the easy part, create a common background with the image, then set the hexagon background to transparent and background-clip. How to setup a hex grid of arbitrary number of rows and columns is the tricky part
Sheikh Barkotullah
Sheikh BarkotullahOP14mo ago
do you have any idea on that?
Joao
Joao14mo ago
I suppose grid is an esy but clunky way of doing it? But that css-tricks article seems very complete about that too
Want results from more Discord servers?
Add your server