CSS ကာတွန်း-အချိန်ကိုက်-လုပ်ဆောင်ချက် ပိုင်ဆိုင်မှု
ဥပမာ
အစမှအဆုံး တူညီသောအမြန်နှုန်းဖြင့် ကာတွန်းတစ်ခုအား ကစားပါ-
div {
animation-timing-function: linear;
}
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ကာတွန်း တစ်ခု၏ animation-timing-function
အမြန်နှုန်းမျဉ်းကွေးကို သတ်မှတ်သည်။
အမြန်နှုန်းမျဉ်းကွေးသည် CSS စတိုင်များကို အစုံလိုက်မှ နောက်တစ်ခုသို့ ပြောင်းလဲရန် ကာတွန်းတစ်ခုအသုံးပြုသည့် TIME ကို သတ်မှတ်သည်။
အပြောင်းအလဲများကို ချောမွေ့စွာပြုလုပ်ရန် speed curve ကိုအသုံးပြုသည်။
မူလတန်ဖိုး: | သက်တောင့်သက်သာ |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS3 |
JavaScript syntax- | အရာဝတ္ထု .style.animationTimingFunction="linear" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
-webkit-၊ -moz- သို့မဟုတ် -o- ဖြင့်လိုက်သောနံပါတ်များသည် ရှေ့ဆက်တွဲတစ်ခုနှင့်အလုပ်လုပ်သော ပထမဆုံးဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
animation-timing-function | 43.0 4.0 -webkit- |
10.0 | 16.0 5.0 -moz- |
9.0 4.0 -webkit- |
30.0 15.0 -webkit- 12.0 -o- |
CSS Syntax
animation-timing-function: linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end|steps(int,start|end)|cubic-bezier(n,n,n,n)|initial|inherit;
ကာတွန်း-အချိန်ကိုက်-လုပ်ဆောင်ချက်သည် အမြန်နှုန်းမျဉ်းကွေးဖြစ်စေရန်အတွက် Cubic Bezier မျဉ်းကွေးဟုခေါ်သော သင်္ချာလုပ်ဆောင်ချက်ကို အသုံးပြုသည်။ ဤလုပ်ဆောင်ချက်တွင် သင့်ကိုယ်ပိုင်တန်ဖိုးများကို သင်အသုံးပြုနိုင်သည်၊ သို့မဟုတ် ကြိုတင်သတ်မှတ်ထားသောတန်ဖိုးများထဲမှ တစ်ခုကို အသုံးပြုနိုင်သည်။
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
linear | The animation has the same speed from start to end | |
ease | Default value. The animation has a slow start, then fast, before it ends slowly | |
ease-in | The animation has a slow start | |
ease-out | The animation has a slow end | |
ease-in-out | The animation has both a slow start and a slow end | |
step-start | Equivalent to steps(1, start) | |
step-end | Equivalent to steps(1, end) | |
steps(int,start|end) | Specifies a stepping function, with two parameters. The first parameter specifies the number of intervals in the function. It must be a positive integer (greater than 0). The second parameter, which is optional, is either the value "start" or "end", and specifies the point at which the change of values occur within the interval. If the second parameter is omitted, it is given the value "end" | |
cubic-bezier(n,n,n,n) | Define your own values in the cubic-bezier function Possible values are numeric values from 0 to 1 |
|
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
အကြံပြုချက်- အောက်ပါ "နောက်ထပ် ဥပမာများ" ကဏ္ဍတွင် မတူညီသော တန်ဖိုးများကို စမ်းကြည့်ပါ။
နောက်ထပ် ဥပမာများ
ဥပမာ
မတူညီသော အချိန်ကိုက်လုပ်ဆောင်မှုတန်ဖိုးများကို ပိုမိုကောင်းမွန်စွာနားလည်ရန်။
ဤသည်မှာ မတူညီသော တန်ဖိုးငါးခုရှိသည့် <div> ဒြပ်စင်ငါးခုဖြစ်သည်-
#div1 {animation-timing-function: linear;}
#div2 {animation-timing-function: ease;}
#div3 {animation-timing-function: ease-in;}
#div4 {animation-timing-function: ease-out;}
#div5 {animation-timing-function: ease-in-out;}
ဥပမာ
အထက်ဖော်ပြပါ ဥပမာကဲ့သို့ပင်၊ သို့သော် အမြန်နှုန်းမျဉ်းကွေးများကို cubic-bezier လုပ်ဆောင်ချက်ဖြင့် သတ်မှတ်ထားသည်-
#div1 {animation-timing-function: cubic-bezier(0,0,1,1);}
#div2 {animation-timing-function: cubic-bezier(0.25,0.1,0.25,1);}
#div3 {animation-timing-function: cubic-bezier(0.42,0,1,1);}
#div4 {animation-timing-function: cubic-bezier(0,0,0.58,1);}
#div5 {animation-timing-function: cubic-bezier(0.42,0,0.58,1);}
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS Animations
HTML DOM ရည်ညွှန်း- animationTimingFunction ပိုင်ဆိုင်မှု