maimuaah Posted January 11, 2022 Posted January 11, 2022 Site URL: https://www.maimouavang.com/ I want the images on the homepage to have a darkening effect when the mouse hovers over it. Similar like this website: https://www.allanchong.com/ I also want to try out the zoom in effect where the mouse hovers. Would be great to know if that's possible too. Thank you in advance!
tuanphan Posted January 11, 2022 Posted January 11, 2022 (edited) Add to Design > Custom CSS /* Homge image hover */ div#page-section-61cead349673080e2f98cdf0 { /* set overlay */ figure a:after { content: ""; background-color: rgba(0,0,0,0.5); position: absolute; z-index: 900; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; } .image-block img { transition: all 0.5s; } /* show overlay on hover */ .image-block:hover figure a:after { opacity: 1; } figure a { position: relative; } .image-block:hover figure img { transform: scale(1.2); }} Edited January 11, 2022 by tuanphan Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment