01
02
<
html
lang
=
"en"
>
03
<
head
>
04
<
meta
charset
=
"utf-8"
/>
05
<
title
>animations in html5 using the canvas element
06
<
script
>
07
08
<
body
>
09
<
canvas
id
=
"canvas"
width
=
"1000"
height
=
"600"
>your browser does not support the
10
<
code
>-element. please think about updating your browser!
11
<
div
id
=
"controls"
>
12
<
button
type
=
"button"
onclick
=
"speed(-0.1);"
>slower
13
<
button
type
=
"button"
onclick
=
"play(this);"
>play
14
<
button
type
=
"button"
onclick
=
"speed(+0.1);"
>faster
15
16
17
01
function
drawcanvas()
HTML5載入動畫
之前我們分享過很多基於css3的loading載入動畫,通過css3的高階特性,可以製作出形態各異的loading載入動畫元件。今天給大家帶來的這款loading載入動畫是基於html5 canvas的,在canvas畫布上,我們動態繪製許多多邊形,這些多邊形伴隨著顏色的隨機變化和旋轉,形成了奇幻色...
HTML5新功能演示
這是乙個html5新功能的演示文件,幾乎包括html5所有激動人心的新功能的簡介和demo。ie系列瀏覽器無法瀏覽,firefox opera等瀏覽器只能使用部分功能,如果想100 演示成功,請使用最新版的 谷歌瀏覽器 google chrome 建議使用最新版。中文版演示文件請看此處 http d...
HTML5 小動畫例子
gif 錄製可能有一些失幀,不過還是放出來看一下吧。這個效果做起來挺簡單的。這裡用到了幾個小動畫 1.寶劍從上面垂直插下來。思路 先設定寶劍元素在螢幕上方,即修改y的值,也可以通過修改margin top來實現 2.尋 字掉下來並且旋轉。思路 修改旋轉角度和y或margin top 3.標題變大再縮...