คุณสมบัติการแปลงรูปแบบ CSS
ตัวอย่าง
ให้องค์ประกอบย่อยที่แปลงแล้วรักษาการแปลง 3 มิติ:
div
{
transform: rotateY(60deg);
transform-style: preserve-3d;
}
ความหมายและการใช้งาน
คุณสมบัติtransform-style
ระบุวิธีการแสดงองค์ประกอบที่ซ้อนกันในพื้นที่ 3 มิติ
หมายเหตุ:คุณสมบัตินี้ต้องใช้ร่วมกับ คุณสมบัติ การ แปลง
เพื่อทำความเข้าใจtransform-style
คุณสมบัติให้
ดีขึ้น ให้ดู การสาธิต
ค่าเริ่มต้น: | แบน |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.transformStyle="preserve-3d" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
ตัวเลขตามด้วย -webkit- หรือ -moz- ระบุเวอร์ชันแรกที่ทำงานกับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
transform-style | 36.0 12.0 -webkit- |
11.0 | 16.0 10.0 -moz- |
9.0 4.0 -webkit- |
23.0 15.0 -webkit- |
ไวยากรณ์ CSS
transform-style: flat|preserve-3d|initial|inherit;
มูลค่าทรัพย์สิน
Property Value | Description |
---|---|
flat | Specifies that child elements will NOT preserve its 3D position. This is default |
preserve-3d | Specifies that child elements will preserve its 3D position |
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 Transforms
กวดวิชา CSS: CSS 3D Transforms
การอ้างอิง HTML DOM: คุณสมบัติ transformStyle