Z
Z
zeppelin322019-11-30 15:38:19
css
zeppelin32, 2019-11-30 15:38:19

How are blocks with complex cuts made?

I ran into a problem with layout of a block with a cutout so that this block still has a shadow, and not along a rectangular outline, but along the outline of the cutout. As well as the shadow of the round element. I laid out the top and bottom block, and on top of them I put the third (round). But there are problems:
1. Not all corners of the border-radius turned out to be rounded
2. I can’t apply a shadow to the top and bottom blocks, it does not follow the contour of the figure.
Here is how it should be:
5de2628f4c37d908665461.png
And here how I did
5de262983221f078626682.png
Tell me, please, how such issues are resolved?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RAX7, 2019-11-30
@zeppelin32

on SVG, you can make a cutout even in the shape of a kitten

N
name surname, 2019-11-30
@symbol

https://jsfiddle.net/z6jm5L3h/
partial solution (without rounding inner corners)

P
profesor08, 2019-11-30
@profesor08

https://developer.mozilla.org/en/docs/Web/CSS/clip-path

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question