-1

嗨,我正在重新制作 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>

非常感谢任何帮助,谢谢:)

4

1 回答 1

1

如果您的图标大小相同,那么您只需要justify-content父 div 上的属性,即"mostUsedApps"

如果它们的大小不同,那么您需要提供指向 codepen 或 codeandbox 的链接,否则将很难提供帮助。

于 2019-02-18T14:41:52.793 回答