admin管理员组文章数量:1328577
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; }
本文标签: customizationadding fade on mouseover to images
版权声明:本文标题:customization - adding fade on mouseover to images 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742233644a2437676.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
transition opacity
. How easy it is in your case depends on the theme. – cjbj Commented Jul 24, 2020 at 10:25