网站介绍动画由图像JS

时间:2013-02-24 21:51:28

标签: javascript html5 animation

所以我有6个png-s,我想编译成网站的介绍动画。它会自动开始,并在完成后将我们带到索引页面。 我希望它适用于所有设备。我想这可以用JS完成,所以你知道任何好的教程我似乎无法找到它。

谢谢!

1 个答案:

答案 0 :(得分:0)

使用jQuery ...

1) pre-load the images
2) Create a div on the page
3) create a function, call it once
4) in the function, update the content of the div with the next image, update a variable (to tell what image is next) and call the function from within itself with setTimeout()
5) Once all images have been shown, direct the user to some page via document.location = "http://....."

由于所有图像都是预先加载的,因此它应该运行顺畅。 GL

编辑:或创建一个gif,并在X秒后重定向用户......