DEV Community

Akash Varma
Akash Varma

Posted on

8 1

CSS background-image as box-shadow?

Hi,

Is it possible to get background image as box-shadow?

Yes, it is!!

One way is to add extra div, make it as position absolute and add background-image URL. To be optimistic I used ::after(psuedo element) and inherited background-image from parent div.

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →