I am trying to achieve a logo that spins around on a slight delay after page load. At the moment I am using this code pretty much exactly, however at the moment it works when the user flicks the image, as i said, I just want it to spin on load.

Total newbie at JS, I would do a jsFiddle, but am having trouble to get it to work at all in there. Can anyone help me out?

http://925html.com/files/html5logo/ < Current Code

Thanks, Red

有帮助吗?

解决方案

Seems you can do this:

YUI().use('transition', function (Y){
                    Y.one('#logo').transition({
                        transform    : 'rotateY(' + 360 + 'deg)',
                        duration    : 2,
                        easing        : 'ease-out'
                    }, function(){
                        this.setStyle('webkitTransform', 'rotateY(0deg)');
                    });

            });

http://jsfiddle.net/HFFDR/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top