CSS -rooster-outo-kolomme Eiendom
Voorbeeld
Stel 'n verstekgrootte vir die kolomme in 'n rooster:
.grid-container {
display: grid;
grid-auto-columns: 50px;
}
Definisie en gebruik
Die grid-auto-columns
eiendom stel 'n grootte vir die kolomme in 'n roosterhouer.
Hierdie eienskap raak slegs kolomme met die grootte wat nie gestel is nie.
Standaard waarde: | outo |
---|---|
Geërf: | geen |
Animateerbaar: | ja. Lees oor animeerbaar |
Weergawe: | CSS Grid Uitleg Module Vlak 1 |
JavaScript-sintaksis: | voorwerp .style.gridAutoColumns="120px" |
Blaaierondersteuning
Die nommers in die tabel spesifiseer die eerste blaaierweergawe wat die eiendom ten volle ondersteun.
Property | |||||
---|---|---|---|---|---|
grid-auto-columns | 57 | 16 | 52 | 10 | 44 |
CSS-sintaksis
grid-auto-columns: auto|max-content|min-content|length;
Eiendomswaardes
Value | Description | Play it |
---|---|---|
auto | Default value. The size of the columns is determined by the size of the container | |
fit-content() | ||
max-content | Sets the size of each column depending on the largest item in the column | |
min-content | Sets the size of each column depending on the smallest item in the column | |
minmax(min.max) | Sets a size range greater than or equal to min and less than or equal to max | |
length | Sets the size of the columns, by using a legal length value. Read about length units | |
% | Sets the size of the columns, by using a percent value |
Verwante bladsye
CSS-tutoriaal: CSS-roosteruitleg
CSS-verwysing: Die rooster-outo-rye- eienskap