With CSS, can I increase the contrast of the background image when it freezes?

I looked at other topics about this, but they all offer to play with opacity and transparency.

But I want to do the opposite: increase the contrast of the background image (using the same BG image) or some other way to achieve something similar.

Thank you very much. Relations

+4
source share
2 answers

Try placing the background on top of a regular black background, setting the opacity to 0.8 or 0.9, and then setting it to 1.0 when you hover.

+8
source

If you are restricting yourself to Webkit, you can use some filter properties that you may encounter:

http://html5-demos.appspot.com/static/css/filters/index.html

If you need more ... well, it looks like every major browser has its own support for something (yes, even Internet Explorer :). I'm not sure how they can be combined into a complete solution.

+2
source

Source: https://habr.com/ru/post/1433509/


All Articles