0

I'm a teacher and I have been using blogger for years, but a couple of days ago, I decided to switch to WP and opted for premium plan. I'm not a designer, but am able to do basic things (adding custom css to a blogger theme, or changing html in blog posts) and I've been wondering if there is a way to add a fade effect to images on mouseover with css or html only, without installing any plugins? (for example - to masonry block as well as to specific images only)

Thanks!

1
  • Normally, this is easily done in css with transition opacity. How easy it is in your case depends on the theme.
    – cjbj
    Commented Jul 24, 2020 at 10:25

2 Answers 2

0

You can apply css in style.css or theme.css in your theme folder. also many themes allowing to add css in theme options or Custumize section. You can check css from here on image hover. https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_image_overlay_opacity

0

Thank you. I used this code - grey on hover: img { -webkit-filter: grayscale(0%); /* For Webkit browsers / -webkit-transition: .5s ease-in-out; / For Webkit browsers / -moz-filter: grayscale(0%); / For Firefox / -moz-transition: .5s ease-in-out; / For FireFox */ -o-filter: grayscale(0%); -o-transition: .5s ease-in-out; }

img:hover { -webkit-filter: grayscale(100%); /* For Webkit browsers / -webkit-transition: .5s ease-in-out; / For Webkit browsers / -moz-filter: grayscale(100%); / For Firefox / -moz-transition: .5s ease-in-out; / For Firefox */ -o-filter: grayscale(100%); -o-transition: .5s ease-in-out; }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.