-1

だから私はウェブサイトのイントロアニメーションにコンパイルしたい6つのpng-sを持っています. 自動的に開始する必要があり、終了するとインデックスページに移動します。すべてのデバイスで動作するようにしたい。私はそれがJSでできると思うので、私がそれを見つけることができないような良いチュートリアルコースを知っていますか.

ありがとう!

4

1 に答える 1

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 秒後にユーザーをリダイレクトします...

于 2013-02-24T21:55:50.490 に答える