-
Hi there,
I have a Pro version. Can you guide me through making image hover effects like those in the link? Thank you.
-
Hi there,
You’ll need to experiment with the Effects module to achieve that effect.
https://docs.generateblocks.com/article/effects-overview/Unfortunately, we can’t provide the exact settings for the Effects module, but I can offer some CSS to achieve that, assuming you already have a layout similar to the example and just need to add the effect.
-
Hi Alvind,
Can you share me the CSS code and I’ll try them out tomorrow.
Appreciate it.
-
Can you link me to the page and section where you want this effect to be applied? I need to see the selector to provide the correct CSS.
-
Sure, I just add some comments in private information.
-
Hi there,
as those images are not 100% width of the container and you want to maintain the border radius ( I assume ) then it will require some CSS:
.has-zoom-image figure { width: max-content; margin-inline: auto; overflow: hidden; border-radius: 20px; } .has-zoom-image figure img { transition: transform 0.2s ease; } .has-zoom-image figure:hover img { transform: scale(1.1); }
Then select the Container Block that has the image inside and give it a CSS Class of:
has-zoom-image
Note the CSS adds border-radius and auto margins ( to center ) to the
figure
element which wraps the image. This is so the image can be zoomed into and not scaled bigger. -
Hi David,
Thank you so much. The code works.
If I add a container outside the image, can I get the same hover effect with the image block instead of additional CSS?
-
So if you add the Container Block around the image, and set the Container Blocks:
i) Layout > Overflow X & Y to hidden
ii) Sizing > Width tomax-content
iii) Spacing > Margin Left & Right toauto
iv) Border Radius , set the border radius here instead of the image blockThen select the Image Block, and create a Transform effect
https://docs.generateblocks.com/article/effects-overview/
Set the:
Type to Scale, Device to Desktop, State to Hover and Target to Self.
Then adjust the scale for the effect.
Then Click to add the Transition -
Issue solved, thank you!
- You must be logged in to reply to this topic.