简体   繁体   中英

How is the new google logo (moving balls) implemented?

I got the code for the new google.com's doodle: http://gist.github.com/567948

The problem is, all the values in the <div id="hplogo"> is changing dynamically, but not when I copy the code in my local machine.

It seems only JS + DIV, anything missing?

But now able to replicate it on my local machine.

替代文字

Any suggestions?

the source on github on line 153 says:

if (!v & amp; & amp; window.location.href.indexOf("#") == -1) {

it's supposed to be

if (!v && window.location.href.indexOf("#") == -1) {

Just wondering, did you put and tags around it? Seems to work fine on my Firefox 3.6. I copied it to http://michaelhendrickx.com/googledots.html

I'm not sure what you mean with the "changing dynamically". It seems to be the coordination values of the particles.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM