Make a box shadow stop halfway
Hi, I'd like to create this effect with the images at the top.
As you can see the box shadow stops at the border of the white background.
The image and the box shadow have to be one element but i can use pseudo elements like ::after.
How could i create this effect?
3 Replies
https://codepen.io/axl-prudhomme/pen/WNJyaKG
this is that image with a box shadow
put a filter:drop-shadow() on the container instead of box-shadow on individual elements. that will give a shadow on the complete thing
something like this
https://codepen.io/MarkBoots/pen/OJZEawj?editors=1010
ah wow it like inherits from the parent element
didn't know that
and once i set a background color it reset the drop shadow on the texts so it is all fixed with that one ruleset xD