CSS 3D အသွင်ပြောင်းမှုများ
CSS 3D အသွင်ပြောင်းမှုများ
CSS သည် 3D အသွင်ပြောင်းမှုများကိုလည်း ပံ့ပိုးပေးပါသည်။
2D နှင့် 3D အသွင်ပြောင်းခြင်းကြား ခြားနားချက်ကို ကြည့်ရန် အောက်ပါဒြပ်စင်များပေါ်တွင် မောက်စ်ကို နှိပ်ပါ-
ဤအခန်းတွင် အောက်ပါ CSS ပိုင်ဆိုင်မှုအကြောင်း လေ့လာရလိမ့်မည်-
transform
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
transform | 36.0 |
10.0 |
16.0 |
9.0 |
23.0 |
CSS 3D အသွင်ပြောင်းနည်းလမ်းများ
CSS transform
ပိုင်ဆိုင်မှုဖြင့် အောက်ပါ 3D အသွင်ပြောင်းနည်းလမ်းများကို သင်အသုံးပြုနိုင်သည်-
rotateX()
rotateY()
rotateZ()
rotateX() နည်းလမ်း
နည်းလမ်း သည် rotateX()
၎င်း၏ X-ဝင်ရိုးတစ်ဝိုက်တွင် ဒြပ်စင်တစ်ခုကို ပေးထားသည့်ဒီဂရီဖြင့် လှည့်သည်-
ဥပမာ
#myDiv
{
transform: rotateX(150deg);
}
rotateY() နည်းလမ်း
နည်းလမ်း သည် rotateY()
သတ်မှတ်ထားသောဒီဂရီဖြင့် ၎င်း၏ Y-ဝင်ရိုးတစ်ဝိုက်တွင် ဒြပ်စင်တစ်ခုကို လှည့်သည်-
ဥပမာ
#myDiv
{
transform: rotateY(150deg);
}
rotateZ() နည်းလမ်း
နည်းလမ်း သည် rotateZ()
၎င်း၏ Z-ဝင်ရိုးတစ်ဝိုက်တွင် ဒြပ်စင်တစ်ခုကို ပေးထားသည့်ဒီဂရီဖြင့် လှည့်သည်-
ဥပမာ
#myDiv
{
transform: rotateZ(90deg);
}
CSS Transform Properties
အောက်ပါဇယားသည် 3D အသွင်ပြောင်းခြင်း ဂုဏ်သတ္တိအားလုံးကို စာရင်းပြုစုထားသည်။
Property | Description |
---|---|
transform | Applies a 2D or 3D transformation to an element |
transform-origin | Allows you to change the position on transformed elements |
transform-style | Specifies how nested elements are rendered in 3D space |
perspective | Specifies the perspective on how 3D elements are viewed |
perspective-origin | Specifies the bottom position of 3D elements |
backface-visibility | Defines whether or not an element should be visible when not facing the screen |
CSS 3D အသွင်ပြောင်းနည်းလမ်းများ
Function | Description |
---|---|
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 |
translate3d(x,y,z) | Defines a 3D translation |
translateX(x) | Defines a 3D translation, using only the value for the X-axis |
translateY(y) | Defines a 3D translation, using only the value for the Y-axis |
translateZ(z) | Defines a 3D translation, using only the value for the Z-axis |
scale3d(x,y,z) | Defines a 3D scale transformation |
scaleX(x) | Defines a 3D scale transformation by giving a value for the X-axis |
scaleY(y) | Defines a 3D 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 |
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 |
perspective(n) | Defines a perspective view for a 3D transformed element |