【发布时间】:2019-02-20 21:08:15
【问题描述】:
我正在重新制作 Google Chrome 主页,但我被困在页面底部带有空格的部分。我不能让他们完美。其中两个图标不对齐。
与我得到的相比,这是我所需要的
两侧的空间太小,中间的空间太大。
如果我能以某种方式使中间的空间更小而侧面的空间更大,那么我可以重现第一张图片
我试过了justify-content: space-between;
和justify-content: space-around;
和justify-content: space-even;
他们不工作
这是我的html
<div class='mostUsedApps'>
<div class='row'>
<div class='youtube rowCell'></div>
<div class='facebook rowCell'></div>
<div class='roblox rowCell'></div>
<div class='Agar rowCell'></div>
<div class='gmail rowCell'></div>
</div>
</div>
这是css
.youtube{
background-image: url(youtube.png);
}
.facebook{
background-image: url(facebook.png);
}
.roblox{
background-image: url(roblox.png);
}
.Agar{
background-image: url(Agar.png);
}
.gmail{
background-image: url(gmail.png);
}
.rowCell {
width: 256px;
height: 61px;
display: inline-block;
background-repeat: no-repeat;
}
.row {
padding: 120px 0 0 424px;
height: 112px;
width: 525px;
display: flex;
}
知道我该怎么做,谢谢(:
【问题讨论】:
-
抱歉发错了,我会改正的
-
另外,如果你创建一个 fiddle / sn-p 重现问题会更好
-
仍然需要另一个结束 div 标签。图片的尺寸是多少?
-
<div class='row'>的结束标签在哪里?? -
图片大小为48*48
标签: html css whitespace spacing