Add or Remove Image Filters on Hover
What does this code do?
This code snippet will allow you to add or remove a filter when a visitor hovers over an image.
Code Snippets
Choose whether you want to add or remove the image filter on hover. Then copy and paste the appropriate code into Design > Custom CSS.
/* Remove Image Filter on Hover */ .sqs-block-image { filter: grayscale(100%); filter: grayscale(100%); } .sqs-block-image:hover { filter: none !important; filter: none !important; } /* Add Image Filter on Hover */ .sqs-block-image { filter: none; filter: none; } .sqs-block-image:hover { filter: grayscale(100%) !important; filter: grayscale(100%) !important; }
More Filter Options
blur(px)
brightness(%)
contrast(%)
hue-rotate(deg)
invert(%)
opacity(%)
saturate(%)
sepia(%)
How To Use It
Copy and paste the code snippet as indicated above.
Choose the filter you would like to use. Make sure to use the unit indicated.
Customize the number to change the strength of the effect.