- This topic has 17 replies, 4 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
November 27, 2022 at 1:24 am #2436770
Manuel
Hello dear team,
I would like to add Zoom Effect on Hover on the 3 images that I have on my homepage https://manuelmeszarovits.com/
I tried to find the solution on the documentation and forum, but sorry I didn’t find.
Thanks for your time,
ManuelNovember 27, 2022 at 4:55 am #2436921David
StaffCustomer SupportHi there,
1. Add this CSS to your site:
@media(pointer: fine) { .has-zoom { overflow: hidden; } .has-zoom img { transform: scale(1); transition: transform 0.8s ease; } .has-zoom:hover img { transform: scale(1.05); } }2. Edit the page, select the Image Block you want to apply the zoom effect to. And in Advanced > Additional CSS Class(es) add:
has-zoomNovember 27, 2022 at 5:22 am #2436948Manuel
Thank you for your quick reply David.
It’s not working. Maybe I didn’t add the code has-zoom on the right place.
Here you are a screen print https://manuelmeszarovits.com/wp-content/uploads/2022/11/screen-print-has-zoom.jpg
Thanks,
ManuelNovember 27, 2022 at 5:34 am #2436961David
StaffCustomer SupportIts fine, i made a mistake in my CSS.
I have updated the CSS here:https://generatepress.com/forums/topic/zoom-effect-on-hover-images-homepage/#post-2436921
Can you try that.
November 27, 2022 at 5:54 am #2436984Manuel
Working perfectly David.
And to give a little white opacity with the zoom effect?
Something like: hover .image {
opacity: 0.3;November 27, 2022 at 5:59 am #2436989Manuel
Like this code is better but I don’t know how to insert correctly in the CSS:
opacity: 0.5;
filter: alpha(opacity=40);November 27, 2022 at 6:01 am #2436992Manuel
Sorry is working perfectly!
Thank you again for your fucking efficient support! The best of the world!
Warm regards,
ManuelNovember 28, 2022 at 4:04 am #2438654David
StaffCustomer SupportGlad to be of help 🙂
November 28, 2022 at 5:21 am #2438745Manuel
Oh sorry David I forgot to ask yesterday. How to make the same on my journal (Archive page) https://manuelmeszarovits.com/journal/
Because I don’t know where are the images to add has-zoom code?
Thanks again for your time,
ManuelNovember 28, 2022 at 7:05 am #2438916David
StaffCustomer SupportReplace the above CSS with this:
@media(pointer: fine) { :is(.blog, .archive) .post-image, .has-zoom { overflow: hidden; } :is(.blog, .archive) .post-image img, .has-zoom img { transform: scale(1); opacity: 1; filter: alpha(opacity=100); transition: all 0.8s ease; } :is(.blog, .archive) .post-image:hover img, .has-zoom:hover img { transform: scale(1.05); opacity: 0.5; transition: all 0.8s ease; filter: alpha(opacity=40); } }November 28, 2022 at 9:56 am #2439470Manuel
Working perfectly David.
Thank you so so so so much 😉
ManuelNovember 29, 2022 at 2:14 am #2440579David
StaffCustomer SupportGlad to be of help!
December 8, 2022 at 3:30 pm #2455191Patrick
Hi,
I tried to implement the Zoom Hover Effect on my featured post images in post archive.
I added the CSS and the has-zoom in ADDITIONAL CSS CLASS(ES).but nothing happens: https://staging.tesladriver.net/blog
is it a problem when I use a query loop grid to display my post archive?
best regards
PatrickDecember 8, 2022 at 5:57 pm #2455272Fernando Customer Support
Hi Patrick,
It should work if you add
has-zoomto the class list of the GB Image Block.Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
Can you try adding that and let us know how it goes?
December 9, 2022 at 6:25 am #2455861Patrick
Hi Fernando,
I tried that. See: https://www.dropbox.com/s/ix6d1oh7cucnod2/GB-image-block-add-css.jpg?dl=0I also added the CSS in “additional CSS” of Generatepress:
@media(pointer: fine) { .has-zoom { overflow: hidden; } .has-zoom img { transform: scale(1); transition: transform 0.8s ease; } .has-zoom:hover img { transform: scale(1.05); } -
AuthorPosts
- You must be logged in to reply to this topic.