This design is created in photoshop and I’m trying to convert to html and css.
I have a background image (with the green lights), an overlay with reduced opacity and some text with an icon positioned at the center. How can I attain the effect shown below in html and css?
50vmax is a shadow spread wide enough and middle alignment can be done e.g. via flexbox positioning. Just adjust the alpha value of the shadow (or the color) as you prefer.
3
Answers
you could apply a
border-radius
to the inner element and abox-shadow
like so:50vmax
is a shadow spread wide enough and middle alignment can be done e.g. via flexbox positioning. Just adjust the alpha value of the shadow (or the color) as you prefer.Final result
Check here!
Basically you can create a transparent round shape with a big white (or black) border!
JSFiddle