CSS အသွင်ပြောင်း-မူရင်း ပိုင်ဆိုင်မှု
ဥပမာ
လှည့်ပတ်ထားသော ဒြပ်စင်တစ်ခု၏ အခြေခံနေရာချထားမှုကို သတ်မှတ်ပါ-
div
{
transform: rotate(45deg);
transform-origin: 20% 40%;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
transform-origin
ပိုင်ဆိုင်မှုသည် သင့်အား ပြောင်းလဲထားသော ဒြပ်စင်များ၏ အနေအထားကို ပြောင်းလဲရန် ခွင့်ပြုသည် ။
2D အသွင်ပြောင်းခြင်းသည် ဒြပ်စင်တစ်ခု၏ x- နှင့် y-ဝင်ရိုးကို ပြောင်းလဲနိုင်သည်။ 3D အသွင်ပြောင်းခြင်းသည် ဒြပ်စင်တစ်ခု၏ z-ဝင်ရိုးကိုလည်း ပြောင်းလဲနိုင်သည်။
transform-origin
ပိုင်ဆိုင်မှု
ကို ပိုနားလည်ရန် ၊ သရုပ်ပြတစ်ခုကို ကြည့်ပါ ။
မှတ်ချက်- ဤပိုင်ဆိုင်မှုကို အသွင်ပြောင်း ထားသော ပိုင်ဆိုင်မှုနှင့် တွဲသုံးရပါမည်။
အကြံပြုချက်- 3D ပြောင်းလဲမှုများ အတွက် ဤပိုင်ဆိုင်မှုကို ပိုမိုကောင်းမွန်စွာ နားလည်ရန် ၊ သရုပ်ပြတစ်ခုကို ကြည့်ပါ ။
မူလတန်ဖိုး: | 50% 50% 0 |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | ဟုတ်တယ် ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS3 |
JavaScript syntax- | အရာဝတ္ထု .style.transformOrigin="0 0" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
-webkit-၊ -moz- သို့မဟုတ် -o- ဖြင့်လိုက်သောနံပါတ်များသည် ရှေ့ဆက်တွဲတစ်ခုနှင့်အလုပ်လုပ်သော ပထမဆုံးဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
transform-origin (two-value syntax) |
36.0 4.0 -webkit- |
10.0 9.0 -ms- |
16.0 3.5 -moz- |
9.0 3.2 -webkit- |
23.0 15.0 -webkit- 10.5 -o- |
transform-origin (three-value syntax) |
36.0 12.0 -webkit- |
10.0 | 16.0 10.0 -moz- |
9.0 4.0 -webkit- |
23.0 15.0 -webkit- |
CSS Syntax
transform-origin: x-axis y-axis z-axis|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Property Value | Description |
---|---|
x-axis | Defines where the view is placed at the x-axis. Possible values:
|
y-axis | Defines where the view is placed at the y-axis. Possible values:
|
z-axis | Defines where the view is placed at the z-axis (for 3D transformations). Possible values:
|
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS 2D အသွင်ပြောင်းမှုများ
CSS သင်ခန်းစာ- CSS 3D အသွင်ပြောင်းမှုများ
HTML DOM ရည်ညွှန်းချက်- transformOrigin ပိုင်ဆိုင်မှု