I hope someone can help me. I want to animate an image with a hover effect using Wordpress. If you move the mouse over the image, the image should enlarge, but the image box should decrease at the same time.
Here is an example of how I imagine it:
https://solene.qodeinteractive.com/ (If you scroll down to Authentic Photos)
So far I have placed the image in wordpress and inserted the following code in custom css:
.elementor-5528 .elementor-element.elementor-element-e19f93f .elementor-image img:hover {
width: 100%;
height: auto;
-webkit-transform: scale (1.3);
transform: scale (1.2);
-webkit-transition: all 0.7s ease;
transition: all 0.7s ease;
}
However, the image including the image box is now enlarged. What else do I have to add so that the image box does not increase in size with the image, but rather decreases in size?
I would be very grateful if someone can help me.
Best regards,
Julia
question from:
https://stackoverflow.com/questions/65921527/css-hover-reduce-image-box-zoom-image 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…