Transitions (အကူးအပြောင်း)
ဘယ်လို သုံးမလဲ?
Section titled “ဘယ်လို သုံးမလဲ?”Transition လုပ်ချင်တဲ့ Element မှာ transition property ထည့်ပေးရပါတယ်။
Hover (Mouse တင်တဲ့အချိန်) မှာ မဟုတ်ဘဲ၊ မူလ Class မှာ ထည့်ရပါမယ်။
.button { background-color: blue; color: white; /* Property, Duration, Timing-Function */ transition: background-color 0.3s ease;}
.button:hover { background-color: darkblue; /* Mouse တင်ရင် ဒီအရောင်ကို 0.3 စက္ကန့်အတွင်း ပြောင်းသွားမယ် */}Transition Properties
Section titled “Transition Properties”- Property: ဘာကို ပြောင်းမှာလဲ? (
all,background-color,width,transform) - Duration: ဘယ်လောက် ကြာမှာလဲ? (
0.3s,1s,500ms) - Timing Function: ဘယ်လို နှုန်းနဲ့ သွားမှာလဲ?
linear: အစအဆုံး တူတူပဲ။ease: အစနှေး၊ အလယ်မြန်၊ အဆုံးနှေး (သဘာဝ အကျဆုံး)။ease-in: အစ နှေးမယ်။ease-out: အဆုံး နှေးမယ်။
.card { transition: all 0.5s ease-in-out;}