简体   繁体   中英

HTML5 Spinning Logo

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/

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