คุณสมบัติCSS grid-auto-rows
ตัวอย่าง
กำหนดขนาดเริ่มต้นสำหรับแถวในตาราง:
.grid-container {
display: grid;
grid-auto-rows: 150px;
}
ความหมายและการใช้งาน
คุณสมบัติgrid-auto-rows
กำหนดขนาดสำหรับแถวในคอนเทนเนอร์กริด
คุณสมบัตินี้มีผลกับแถวที่ไม่ได้ตั้งค่าขนาดเท่านั้น
ค่าเริ่มต้น: | รถยนต์ |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ใช่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS Grid Layout Module ระดับ 1 |
ไวยากรณ์ JavaScript: | วัตถุ .style.gridAutoRows="60px" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
grid-auto-rows | 57 | 16 | 52 | 10 | 44 |
ไวยากรณ์ CSS
grid-auto-rows: auto|max-content|min-content|length;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
auto | Default value. The size of the rows is determined by the size of the largest item in the row | |
max-content | Sets the size of each row to depend on the largest item in the row | |
min-content | Sets the size of each row to depend on the largest item in the row | |
length | Sets the size of the rows, by using a legal length value. Read about length units |
หน้าที่เกี่ยวข้อง
บทช่วยสอน CSS: เค้าโครงตาราง CSS
การอ้างอิง CSS: คุณสมบัติgrid -auto-columns