ตาราง สไตล์คุณสมบัติเค้าโครง
ตัวอย่าง
กำหนดเค้าโครงตารางคงที่:
document.getElementById("myTable").style.tableLayout = "fixed";
ความหมายและการใช้งาน
คุณสมบัติ tableLayout ตั้งค่าหรือส่งคืนวิธีการจัดวางเซลล์ แถว และคอลัมน์ของตาราง
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
tableLayout | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
ส่งคืนคุณสมบัติ tableLayout:
object.style.tableLayout
ตั้งค่าคุณสมบัติ tableLayout:
object.style.tableLayout = "auto|fixed|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
auto | Column width is set by the widest unbreakable content. This is default.
|
fixed | Column width is set by the width of table and columns (not the content of the cells)
|
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | รถยนต์ |
---|---|
คืนมูลค่า: | สตริง แทนอัลกอริทึมการจัดวางตารางที่ใช้สำหรับ table |
เวอร์ชัน CSS | CSS2 |
ตัวอย่างเพิ่มเติม
ตัวอย่าง
กลับเค้าโครงตาราง:
alert(document.getElementById("myTable").style.tableLayout);
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Table
การอ้างอิง CSS: คุณสมบัติเค้าโครงตาราง
❮ สไตล์วัตถุ