Trying to “translate” photoshop design into HTML/CSS code and got stuck with color/image blending problem.
In Photoshop design I have layers as following:
- Image (20% opacity)
- Background color (100% opacity)
This translates into something like this:
Now in theory I could swap the order or the layers (image 100% opacity and background color 80%) but overall result would look different:
Here is how I have to wrap them:
<footer>
background image is visible here
<div>color overlay visible here</div>
</footer>
Exporting merge background is not an option.
Any suggestions?
2
Answers
Because you want the overlay to be on top of the background, you need to give it a z-index.
HTML:
CSS:
you could give a try to mix-blend-mode
gradients bg would do too
rgba()
(orhsla()
) colors could be a fallback