jQuery图像动画从一个位置到另一个位置 [英] Jquery Image Animation from one location to another

查看:192
本文介绍了jQuery图像动画从一个位置到另一个位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做一个简单的图像动画,假设在位置A处有100 * 100像素图像的小图像.我想将图像从位置A移到位置B并在位置B处最大化.

I want to do a simple image animation.Assume that there is small image of 100*100 pixel image at location A. I want to move the image from location A to location B and maximize the at location B.

我同时拥有尺寸图和尺寸图.我不想增加图像本身的宽度和高度.我有一幅单独的图像用于显示大图像.

I have both the dimension images small and large. I don't want to increase the width and height of image itself. I have a separate image for showing large one.

我已经在flash,flex中看到了这种效果.如果用户单击图像A,它将保持过渡状态,以便用户不会丢失上下文.

I have seen this kind of effect in flash , flex. If user clicks on image A it maintains the transition so that user doesn't loose the context.

我将在一个网格中有20张图像,并在左侧面板中保留大图像.每当您单击网格上的任何图像时,它都会刷新有关该图像的所有详细信息的左面板.现在,我只是将左面板替换为大图像.能给我任何指示如何实现这种过渡的方法吗?

I will have 20 images in a grid and a left panel to hold the big image. Whenever you click any image on the grid , it gets refresh the left panel with all the details about that image.Right now i am just replace the left panel with big image. can you please give me any directions how to achieve this transition

推荐答案

图像不能实际上淡入其他图像;您需要伪造它.

Images cannot actually fade into other images; you need to fake it.

使用CSS将其中一张图片浮动到另一张图片上.一个应该隐藏,一个应该可见.当您要在两者之间切换时,请先将隐藏的其中一个淡入淡出,然后再将隐藏的一个淡入淡出.

Have one of the images floating the other using CSS. One should be hidden, and one should be visible. When you want to switch between the two, fade the hidden one in to be visible as you fade the visible one out to be hidden.

这篇图像交叉渐变文章讨论了如何使用jQuery的:)

This Image Cross Fade Transition article discusses different methods of how to do this with jQuery :)

这篇关于jQuery图像动画从一个位置到另一个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆