How to set box-shadow to an <img> tag which has an image with transparent corners? (CSS) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to set box-shadow to an <img> tag which has an image with transparent corners? (CSS)

My image has transparent corners, like an icon. But how do I set a box-shadow for the <img> tag which is not square-shaped? I want a shadow which follows the shape of the current image. Is there any CSS solution for this?

27th Aug 2017, 9:47 AM
Levente Varga
Levente Varga - avatar
1 Answer
0
As far as I know the only solution is set a shadow for the image in a picture editing software e.g. photoshop
27th Aug 2017, 12:57 PM
J-D-X