This question already has an answer here:
- Transparent hollow or cut out circle 5 answers
I am looking for a way to create a square div of relative size, say, 70% x 70% with a background color and a circular hole in it (so that the background can be seen behind it) of the same size so that the sides of the div are tangent.
You could use
radial-gradient
to achieve this.Here's an
svg
approach.