[javascript] Google谷歌首页点点效果
2008-06-02 10:21
585 查看
上周五抽空实现了一下谷歌首页(其实是韩国google先搞的)的动画效果,感觉挺有意思,在这里和大家分享下。
这个效果的思路蛮有趣的,是一个类似于我们小时候翻书动画(也叫走马灯?)的效果,将一张大的png图片每次显示一部分。
说明一下,我的实现没有google的那样精致,它最后还有一个返回一点的效果。我为了简单,省略了,呵呵。
首先,这是google用的素材图片:
if (typeof(geekeesjs) == "#ff0000")
//Updated 4/18/2003: Footprint decreased, minor code improvements.
//Updated 5/3/2003: Minor comment clarification; no code changes.
//Updated 5/10/2003: Minor code improvements.
// The constructor should be called with
// the parent object (optional, defaults to window).
// The set functions should be called with:
// - The name of the object method (as a string) (required)
// - The millisecond delay (required)
// - Any number of extra arguments, which will all be
// passed to the method when it is evaluated.
// The clear functions should be called with
// the return value from the equivalent set function.
// Private data
Timer.set = new Array();
准备工作做完,接下来开始代码主题了,其实还是挺简单的,递归调用而已,只不过是oo的方法实现,看起来比较那个,呵呵。注释是用英文写的,看懂应该问题不大。
<div id="divAni" class="animator_containter" onmouseover="go();return false;" onmouseout="back();return false;">
</div>
完整代码下载
http://files.cnblogs.com/jinweijie/google_toolbar_ani.rar
【updated】
多个动画同时显示的调用
http://files.cnblogs.com/jinweijie/g_toolbar_multi.rar
斗胆发在首页,望各位高人多多指教,若给您浏览带来不便,在这里深表歉意!
这个效果的思路蛮有趣的,是一个类似于我们小时候翻书动画(也叫走马灯?)的效果,将一张大的png图片每次显示一部分。
说明一下,我的实现没有google的那样精致,它最后还有一个返回一点的效果。我为了简单,省略了,呵呵。
首先,这是google用的素材图片:
if (typeof(geekeesjs) == "#ff0000")
//Updated 4/18/2003: Footprint decreased, minor code improvements.
//Updated 5/3/2003: Minor comment clarification; no code changes.
//Updated 5/10/2003: Minor code improvements.
// The constructor should be called with
// the parent object (optional, defaults to window).
// The set functions should be called with:
// - The name of the object method (as a string) (required)
// - The millisecond delay (required)
// - Any number of extra arguments, which will all be
// passed to the method when it is evaluated.
// The clear functions should be called with
// the return value from the equivalent set function.
// Private data
Timer.set = new Array();
准备工作做完,接下来开始代码主题了,其实还是挺简单的,递归调用而已,只不过是oo的方法实现,看起来比较那个,呵呵。注释是用英文写的,看懂应该问题不大。
<div id="divAni" class="animator_containter" onmouseover="go();return false;" onmouseout="back();return false;">
</div>
完整代码下载
http://files.cnblogs.com/jinweijie/google_toolbar_ani.rar
【updated】
多个动画同时显示的调用
http://files.cnblogs.com/jinweijie/g_toolbar_multi.rar
斗胆发在首页,望各位高人多多指教,若给您浏览带来不便,在这里深表歉意!
相关文章推荐
- [转][javascript] Google谷歌首页点点效果
- 利用CSS和javascript实现Google首页的动画效果
- 模仿google首页图片动画效果 (css+javascript)
- 利用javascript从数据库取数据来实现CSDN首页图片的切换效果
- 用javascript仿163首页的广告收缩效果~~~~~~
- 利用javascript从数据库取数据来实现CSDN首页图片的切换效果
- google首页效果 js特效 全注释 记得当时分析了好长时间
- 一个不错的,JavaScript代码,显示首页图片幻灯片效果
- [原]模仿Google首页的PNG动画效果
- 最新google首页的超酷导航效果
- JavaScript学习——使用JS实现首页轮播图效果
- google的首页动画效果[JS]
- google曾经的首页小图标,JS+CSS实现的动画效果
- 用javascript实现网站首页轮播图效果
- sina首页广告效果-JavaScript写让图片/一句话只显示3秒
- jQuery实现仿Google首页拖动效果的方法
- 类似于陌陌点点和探探首页切换效果
- 今天google 首页的javascript 动画实现。好吧,我来晚了。。。
- Javascript模仿阿里云首页实现图片轮询效果
- 利用javascript从数据库取数据来实现CSDN首页图片的切换效果(新增下载地址)