animation
英[ˌænɪˈmeɪʃn] 美[ˌænəˈmeʃən]
n.生氣,活潑;卡通製作,卡通攝製;[影視]卡通片
複數: animations
timing
英[ˈtaɪmɪŋ] 美[ˈtaɪmɪŋ]
n.定時;掌握時機;配光;記時
function
英[ˈfʌŋkʃn] 美[ˈfʌŋkʃən]
#n.功能,作用;應變量,函數;職位;重大;聚會
vi.有或起作用;行使職責
第三人稱單數: functions 複數: functions 現在分詞: functioning 過去式: functioned 過去分詞: functioned
css 動畫計時功能屬性 語法
animation-timing-function是什麼?
animation-timing-function是CSS的動畫屬性,用來規定動畫的速度曲線,也就是動畫的播放方式,讓動畫的變化更為平滑。
作用:animation-timing-function 規定動畫的速度曲線。速度曲線定義動畫從一組 CSS 樣式變成另一套所用的時間。速度曲線用於使變化更為平滑。
語法:animation-timing-function: value;
說明:animation-timing-function 使用名為三次貝塞爾(Cubic Bezier)函數的數學函數,來產生速度曲線。
您能夠在該函數中使用自己的值,也可以預先定義的值:
linear 動畫從頭到尾的速度是相同的。
ease 預設。動畫以低速開始,然後加快,在結束前變慢。
ease-in 動畫低速開始。
ease-out 動畫以低速結束。
ease-in-out 動畫低速開始和結束。
cubic-bezier(n,n,n,n) 在 cubic-bezier 函數中自己的值。可能的值是從 0 到 1 的數值。
註解:Internet Explorer 9 以及更早的版本不支援 animation-timing-function 屬性。
css 動畫計時功能屬性 範例
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 5s infinite;
animation-timing-function:linear;
/* Safari and Chrome */
-webkit-animation:mymove 5s infinite;
-webkit-animation-timing-function:linear;
}
@keyframes mymove
{
from {left:0px;}
to {left:200px;}
}
@-webkit-keyframes mymove /* Safari and Chrome */
{
from {left:0px;}
to {left:200px;}
}
</style>
</head>
<body>
<p><strong>注释:</strong>Internet Explorer 9 以及更早的版本不支持 animation-timing-function 属性。</p>
<div></div>
</body>
</html>執行實例 »
點擊 "執行實例" 按鈕查看線上實例

