คุณสมบัติแถวช่องว่าง CSS
ตัวอย่าง
ระบุช่องว่าง 50 พิกเซลระหว่างแถวกริด:
div
{
display: grid;
row-gap: 50px;
}
ตัวอย่าง "ลองใช้เอง" เพิ่มเติมด้านล่าง
ความหมายและการใช้งาน
คุณสมบัติrow-gap
ระบุช่องว่างระหว่างแถวกริด
ทรัพย์สิน นี้row-gap
เดิมชื่อ.
grid-row-gap
ค่าเริ่มต้น: | ปกติ |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ใช่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS Box Alignment Module ระดับ 3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.rowGap="50px" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
row-gap (in Grid) | 66 | 16 | 61 | 12.1 | 53 |
row-gap (in Flexbox) | 84 | 84 | 63 | Not supported | 70 |
ไวยากรณ์ CSS
row-gap: length|normal|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
length | A specified length or % that will set the gap between the rows | |
normal | Default value. Specifies a normal gap between the rows | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Grid Layout
การอ้างอิง CSS: คุณสมบัติช่องว่าง
การอ้างอิง CSS: คุณสมบัติช่องว่างของคอลัมน์