【发布时间】:2019-02-23 12:23:30
【问题描述】:
嗨,我正在重新制作 google chrome 主页,但我似乎无法完成页面底部的部分是最常用的应用程序,我正在尝试使用 display flex 来完成它,因为它将它内联,但我无法获得这里的间距不均匀或大或小是我希望它看起来的样子......
这就是我得到的
最重要的是我需要得到的。 注意间距很小 在中间它很大我正在寻找它是正确的 justify-content 似乎不影响间距? 这是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{
justify-content: space-around;
align-items: center;
position: relative;
background-repeat: no-repeat;
width: 200px;
height: 150px;
margin-top: -589px;
left: 422px;
}
.mostUsedApps{
width: 42%;
display: flex;
justify-content: space-between;
justify-content: space-around;
align-items: center;
}
这里是html
<div class = 'mostUsedApps'>
<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>
非常感谢任何帮助,谢谢:)
【问题讨论】:
-
您好!请提供包含所有实际代码的 JSBin 链接。谢谢!
-
.mostUsedApps { justify-content: space-between; }