我的网站有一个方形格式的新闻部分,动画很像Metro UI。该方块每5-10秒(随机)动画一次,并在文本和图片之间切换。
小提琴
现在我想让动画在用户鼠标悬停时立即切换到文本阶段,并保持在那里,直到鼠标离开。当用户鼠标退出时,动画可以在鼠标进入之前留下的任何延迟中恢复,或者立即切换到图像阶段。我更喜欢第一种方法,但任何方法都可以。
我试着用.hover
做点什么,但我不知道如何最好地暂停/恢复动画。欢呼。
我的网站有一个方形格式的新闻部分,动画很像Metro UI。该方块每5-10秒(随机)动画一次,并在文本和图片之间切换。
小提琴
现在我想让动画在用户鼠标悬停时立即切换到文本阶段,并保持在那里,直到鼠标离开。当用户鼠标退出时,动画可以在鼠标进入之前留下的任何延迟中恢复,或者立即切换到图像阶段。我更喜欢第一种方法,但任何方法都可以。
我试着用.hover
做点什么,但我不知道如何最好地暂停/恢复动画。欢呼。