如何在CSS Grid中指定行之间的间距大小
使用 grid-row-gap属性设置CSS中行之间的间距大小
示例
<!DOCTYPE html>
<html>
<head>
<style>
.container {
display: grid;
grid-auto-rows: 50px;
grid-column-gap: 30px;
grid-row-gap: 50px;
background-color: #95A5A6;
padding: 10px;
}
.container>div {
background-color: #F0F3F4;
text-align: center;
padding:10px 0;
font-size: 20px;
}
.ele3 {
grid-column-end: span 2;
}
</style>
</head>
<body>
<div class = "container">
<div class = "ele1">1</div>
<div class = "ele2">2</div>
<div class = "ele3">3</div>
<div class = "ele4">4</div>
<div class = "ele5">5</div>
<div class = "ele6">6</div>
</div>
</body>
</html>热门推荐
10 圣诞祝福语简短小学
11 祖国七十华诞简短祝福语
12 老师送的祝福语简短
13 生日祝福语大全女生简短
14 祝女性生日祝福语简短
15 牛年女神节祝福语简短
16 情人表白祝福语简短大气
17 老公开业祝福语简短
18 官宣新年祝福语简短