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!
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!
Share Improve this question asked Jul 24, 2020 at 8:28 baksudinbaksudin 1 1 |2 Answers
Reset to default 0You 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/howto/tryit.asp?filename=tryhow_css_image_overlay_opacity
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; }
transition opacity
. How easy it is in your case depends on the theme. – cjbj Commented Jul 24, 2020 at 10:25