樣式 tableLayout 屬性
描述
tableLayout 屬性設定或返回用於佈局表格單元格、行和列的方式。
瀏覽器支援
屬性 | |||||
---|---|---|---|---|---|
tableLayout | 是 | 是 | 是 | 是 | 是 |
語法
返回 tableLayout 屬性
object.style.tableLayout
設定 tableLayout 屬性
object.style.tableLayout = "auto|fixed|initial|inherit"
屬性值
值 | 描述 |
---|---|
auto | 列寬由最寬的不可斷行內容決定。這是預設值。
|
fixed | 列寬由表格和列的寬度決定(而非單元格的內容)
|
initial | 將此屬性設定為其預設值。閱讀關於 initial |
inherit | 從其父元素繼承此屬性。閱讀關於 inherit |
技術詳情
預設值 | auto |
---|---|
返回值 | 字串,表示用於表格的表佈局演算法 |
CSS 版本 | CSS2 |
更多示例
相關頁面
CSS 教程:CSS 表格
CSS 參考:table-layout 屬性