How do I go about this design?
No codepen because not sure where to start. I was thinking maybe exporting the circles as an svg and using the path as a
clip-path
? But if I do that, then the green circle on the left would need to be in the image or absolutely positioned on it so not sure how well that would work12 Replies
I'd go with the clip path as you were saying but add a display grid on the container, so you have 6 boxes, and then you add a circle and you tell it to position on that square and then you add the white box
Sorry I should have included what I have at least:
I have this already, but it needs to be 1 image and not 5 separate images; did I misunderstand what you were trying to say?
I explained myself badly
@vince
This is how I'd do it (plz ignore the px widths and stuff, they're just there cause I'm lazy) https://codepen.io/jochemm/pen/ExzjYeX
here's another option with
mask
. Done as one element (or one pseudo) as a stand in for a background : https://codepen.io/jsnkuhn/pen/zYQGYNR?editors=1100tysm everyone! I'll look into these a bit later and let you know how I crack on π
instead I came out with this, didnt end up using grid, the colors are ugly but I did it in a rush
https://codepen.io/Lko3001/pen/bGydNpo
Very cool solutions guys! I keep saying this but I really need to learn gradients π
Also @Jochem I didn't know you could do this:
π is that new?
nope, just criminally underused
it's fully supported too
Wow will definitely start using that over typing
grid-template-rows / columns
all day lol