简体   繁体   English

修复Buggy JQuery动画

[英]Fixing Buggy JQuery Animation

I've been trying to create a smooth hover animation using JQuery. 我一直在尝试使用JQuery创建平滑的悬停动画。 So the idea is that when you hover over the picture both the image and the text increase in size. 因此,想法是,当您将鼠标悬停在图片上时,图片和文字的大小都会增加。

However the image is kind of buggy when you hover over it and the text scrolls as you can see in the jsfiddle included. 但是,当您将鼠标悬停在图像上时,图像有点像虫子,并且文本会滚动,如您在包含的jsfiddle中所看到的那样。 Is there anything I can do to make it smoother without the text scrolling? 有什么我可以做的使它更流畅,而无需滚动文本?

You can use the property overflow: hidden; 您可以使用属性溢出:隐藏; inside the css class .textBoxes, like this: 在CSS类.textBoxes中,如下所示:

.textBoxes
{
    display: flex;
    flex-direction:column;
    overflow: hidden;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM