Transformasi Gaya Properti Gaya
Contoh
Biarkan elemen anak yang diubah mempertahankan transformasi 3D:
document.getElementById("myDIV").style.transformStyle = "preserve-3d";
Definisi dan Penggunaan
Properti transformStyle menyetel atau mengembalikan cara elemen bersarang dirender dalam ruang 3D.
Catatan: Properti ini harus digunakan bersama dengan properti transformasi .
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
transformStyle | 36.0 | 11.0 | 16.0 | 9.0 | 23.0 |
Sintaksis
Kembalikan properti transformStyle:
object.style.transformStyle
Setel properti transformStyle:
object.style.transformStyle = "flat|preserve-3d|initial|inherit"
Nilai properti
Value | Description |
---|---|
flat | Default value. The child elements will NOT preserve its 3D position |
preserve-3d | The 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 |
Detail Teknis
Nilai Bawaan: | datar |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti gaya transformasi dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Objek Gaya JavaScript: mengubah properti
Referensi CSS: properti gaya transformasi
Objek Gaya