Google的Logo设计师全是疯子---记现代舞先驱玛莎·葛兰姆117周年诞辰
2011-05-11 17:29
471 查看
今天google的logo继吃豆游戏之后又一次令我大吃一惊---那帮疯子(Logo设计师们)又用JS+png做出了一段华丽的动画!先来看一下效果(可能您看google主页的时候已经它已经换掉了所以我拷下来一份)!
#hplogo{ cursor:pointer; margin:auto auto; background-color:White; width:300px; height:300px; position:relative;}
#hplogo div {
pointer-events: none;
position: absolute;
}
不知道您是否和我一样感觉google那帮设计师确实是疯子!牢骚至于还是简单说下原理吧,以免哪天您也有点“发疯”的意向也好能用得上。下面贴上主要代码:
1 function () {
2 var a = d[f],
3 c = document.getElementById("hplogo");
4 if (c && a[0]) {
5 var b = document.createElement("div");
6 b.id = "hplogo" + f;
7 b.style.left = a[0] + "px";
8 b.style.top = a[1] + "px";
9 b.style.width = a[2] + "px";
10 b.style.height = a[3] + "px";
11 b.style.background = "url(http://www.front2end.cn/wp-content/uploads/graham11-hp-sprite.png) no-repeat " + -g + "px " + -h + "px";
12 b.onmousedown = k;
13 a[3] > i && (i = a[3]);
14 a[4] ? (g = 0, h += i, i = 0) : g += a[2];
15 c.appendChild(b); ++f;
16 f < e && (j = window.setTimeout(l, 83))
17 }
18 } 原理就是用javascript创建动画的每一帧,用div展示,并加载背景图片,随着每一个Div的创建就会形成一段动画,有点像小时候玩的皮影画(不知道是不是叫这个名字)。 js代码下载:googleDance
#hplogo{ cursor:pointer; margin:auto auto; background-color:White; width:300px; height:300px; position:relative;}
#hplogo div {
pointer-events: none;
position: absolute;
}
不知道您是否和我一样感觉google那帮设计师确实是疯子!牢骚至于还是简单说下原理吧,以免哪天您也有点“发疯”的意向也好能用得上。下面贴上主要代码:
1 function () {
2 var a = d[f],
3 c = document.getElementById("hplogo");
4 if (c && a[0]) {
5 var b = document.createElement("div");
6 b.id = "hplogo" + f;
7 b.style.left = a[0] + "px";
8 b.style.top = a[1] + "px";
9 b.style.width = a[2] + "px";
10 b.style.height = a[3] + "px";
11 b.style.background = "url(http://www.front2end.cn/wp-content/uploads/graham11-hp-sprite.png) no-repeat " + -g + "px " + -h + "px";
12 b.onmousedown = k;
13 a[3] > i && (i = a[3]);
14 a[4] ? (g = 0, h += i, i = 0) : g += a[2];
15 c.appendChild(b); ++f;
16 f < e && (j = window.setTimeout(l, 83))
17 }
18 } 原理就是用javascript创建动画的每一帧,用div展示,并加载背景图片,随着每一个Div的创建就会形成一段动画,有点像小时候玩的皮影画(不知道是不是叫这个名字)。 js代码下载:googleDance
相关文章推荐
- Google的Logo记现代舞先驱玛莎·葛兰姆117周年诞辰-Flash版
- google dance js 2011-05-11 现代舞先驱玛莎·葛兰姆 117 周年诞辰
- Google logos 纪念 现代舞先驱玛莎·葛兰姆117 周年诞辰
- Google LOGO现代舞舞蹈动画
- Google首页现代舞先驱玛莎·葛兰姆JS代码分析(附源码下载)
- 设计师谈Google Logo诞生全过程,西边人西说测试
- 萨缪尔摩尔斯诞辰日,Google推出纪念Logo
- 【分享】Doodle精美相册。收集了近几年的Google Logo
- Google 10岁生日!(200多个google特色Logo)
- google和百度的logo
- Google更换新Logo标志
- 隐藏 google 地图 Logo 隐藏 百度 地图 Logo
- Google-Logo大搜集
- 节日Google Doodle、百度Logo大全
- 世界上最成功的 10 位 Logo 设计师
- 2000至2010 Google新年Logo图赏
- 百度Google个性LOGO大比拼(组图)|
- Google时间系列图标之2006-Google LOGO系列
- Google的福娃Logo,还真是很漂亮。
- 设计师Logo作品深得微软欢心 已被招致麾下