jquery动画帮助
我有两个圆圈,一个是小圆圈(拇指),另一个是大圆圈(信息),当用户将鼠标悬停在小圆圈(拇指)上时,小图标需要调整为大图标。我还需要以大的方式展示新的信息。我想我必须通过宽度和高度动画来做到这一点,因为小是 100px X 100px,大是 200 X 200 尺寸。
请提供有关执行此操作的最佳方法的建议。我想避免使用插件。
I have two circles, one is small (thumb) another one is big (info), and when the user hover over the small (thumb), then the small icon need to resize in to big one. I also need to show the new information in the big. I think I have to do this by width and height animation, because small is 100px X 100px, and big is 200 X 200 size.
Please advice on the best way to do this. I would like to avoid using plug-ins.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 jquery 1.4.2 或更高版本,您可以通过以下方法实现此目的:
将类“smallCircle”放入小圆圈中。
PS在悬停的每个状态下,您可以控制动画完成后发生的情况(我放置“//dowhatever”的地方),这就是您可以插入大圆圈内容的地方。
using jquery 1.4.2 or up, you can achieve this by using:
put the class "smallCircle" in the small circle.
P.S. in each state of the hover, you can control what happens after the animation is done (the place where I put "//do whatever"), that's the place where you could insert the content of the big cicrle.