CSS tablo düzeni Özellik
Örnek
Farklı tablo düzeni algoritmaları ayarlayın:
table.a {
table-layout: auto;
width: 180px;
}
table.b {
table-layout:
fixed;
width: 180px;
}
Tanım ve Kullanım
Özellik table-layout
, tablo hücrelerini, satırları ve sütunları düzenlemek için kullanılan algoritmayı tanımlar.
İpucu: Tablo düzeninin ana faydası: sabit; tablonun çok daha hızlı işlenmesidir. Büyük tablolarda, tarayıcı tüm tabloyu oluşturana kadar kullanıcılar tablonun herhangi bir bölümünü görmezler. Bu nedenle, tablo düzeni: sabit kullanırsanız, tarayıcı yüklenip tablonun geri kalanını oluştururken kullanıcılar tablonun üstünü görür. Bu, sayfanın çok daha hızlı yüklendiği izlenimini verir!
Varsayılan değer: | Oto |
---|---|
Miras: | Hayır |
canlandırılabilir: | Hayır. Canlandırılabilir hakkında bilgi edinin |
Sürüm: | CSS2 |
JavaScript sözdizimi: | nesne .style.tableLayout="sabit" |
Tarayıcı Desteği
Tablodaki sayılar, özelliği tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Property | |||||
---|---|---|---|---|---|
table-layout | 14.0 | 5.0 | 1.0 | 1.0 | 7.0 |
CSS Sözdizimi
table-layout: auto|fixed|initial|inherit;
Mülk değerleri
Value | Description | Play it |
---|---|---|
auto | Browsers use an automatic table layout algorithm. The column width is set by the widest unbreakable content in the cells. The content will dictate the layout | |
fixed | Sets a fixed table layout algorithm. The table and column widths are set by the widths of table and col or by the width of the first row of cells. Cells in other rows do not affect column widths. If no widths are present on the first row, the column widths are divided equally across the table, regardless of content inside the cells | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
İlgili Sayfalar
CSS eğitimi: CSS Tablosu
HTML DOM referansı: tableLayout özelliği