简体   繁体   English

HTML5旋转徽标

[英]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. JS的新手,我会做一个jsFiddle,但是很难让它在那里工作。 Can anyone help me out? 谁能帮我吗?

http://925html.com/files/html5logo/ < Current Code http://925html.com/files/html5logo/ <当前代码

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/ http://jsfiddle.net/HFFDR/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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