CSS ကို Property အသွင်ပြောင်းသည် ။
ဥပမာ
မတူညီသော <div> ဒြပ်စင်သုံးခုကို လှည့်ပတ်၊ လှန်ကာ စကေးကို ချိန်ညှိပါ-
div.a {
transform: rotate(20deg);
}
div.b {
transform: skewY(20deg);
}
div.c {
transform: scaleY(1.5);
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
transform
ပိုင်ဆိုင်မှုသည် ဒြပ်စင်တစ်ခုသို့ 2D သို့မဟုတ် 3D အသွင်ပြောင်းခြင်းကို သက်ရောက်သည် ။ ဤပိုင်ဆိုင်မှုသည် သင့်အား လှည့်ရန်၊ အတိုင်းအတာ၊ ရွှေ့ရန်၊ လှည့်ရန်၊ စသည်ဖြင့် အစိတ်အပိုင်းများကို ခွင့်ပြုသည်။
အသွင်ပြောင်းပိုင်ဆိုင်မှုကို ပိုမိုကောင်းမွန်စွာ နားလည်ရန်၊ သရုပ်ပြတစ်ခုကို ကြည့်ပါ ။
မူလတန်ဖိုး: | မရှိ |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | ဟုတ်တယ် ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSS3 |
JavaScript syntax- | အရာဝတ္ထု .style.transform="rotate(7deg)" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
-webkit-၊ -moz- သို့မဟုတ် -o- ဖြင့်လိုက်သောနံပါတ်များသည် ရှေ့ဆက်တွဲတစ်ခုနှင့်အလုပ်လုပ်သော ပထမဆုံးဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
transform (2D) | 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 (3D) | 36.0 12.0 -webkit- |
12.0 | 10.0 | 9.0 4.0 -webkit- |
23.0 15.0 -webkit- |
အထားအသို
transform: none|transform-functions|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description | Play it |
---|---|---|
none | Defines that there should be no transformation | |
matrix(n,n,n,n,n,n) | Defines a 2D transformation, using a matrix of six values | |
matrix3d (n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n) |
Defines a 3D transformation, using a 4x4 matrix of 16 values | |
translate(x,y) | Defines a 2D translation | |
translate3d(x,y,z) | Defines a 3D translation | |
translateX(x) | Defines a translation, using only the value for the X-axis | |
translateY(y) | Defines a translation, using only the value for the Y-axis | |
translateZ(z) | Defines a 3D translation, using only the value for the Z-axis | |
scale(x,y) | Defines a 2D scale transformation | |
scale3d(x,y,z) | Defines a 3D scale transformation | |
scaleX(x) | Defines a scale transformation by giving a value for the X-axis | |
scaleY(y) | Defines a scale transformation by giving a value for the Y-axis | |
scaleZ(z) | Defines a 3D scale transformation by giving a value for the Z-axis | |
rotate(angle) | Defines a 2D rotation, the angle is specified in the parameter | |
rotate3d(x,y,z,angle) | Defines a 3D rotation | |
rotateX(angle) | Defines a 3D rotation along the X-axis | |
rotateY(angle) | Defines a 3D rotation along the Y-axis | |
rotateZ(angle) | Defines a 3D rotation along the Z-axis | |
skew(x-angle,y-angle) | Defines a 2D skew transformation along the X- and the Y-axis | |
skewX(angle) | Defines a 2D skew transformation along the X-axis | |
skewY(angle) | Defines a 2D skew transformation along the Y-axis | |
perspective(n) | Defines a perspective view for a 3D transformed element | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
နောက်ထပ် ဥပမာများ
ဤဥပမာသည် "polaroid" ပုံများကို ဖန်တီးပြီး ပုံများကို လှည့်နည်းကို သရုပ်ပြသည်။
ဆက်စပ်စာမျက်နှာများ
CSS သင်ခန်းစာ- CSS 2D အသွင်ပြောင်းမှုများ
CSS သင်ခန်းစာ- CSS 3D အသွင်ပြောင်းမှုများ
HTML DOM ရည်ညွှန်းချက်- ပိုင်ဆိုင်မှုကို ပြောင်းလဲ ပါ။