【发布时间】:2018-10-21 00:55:15
【问题描述】:
我有一个fiddle,我想在其中以直线列出图像,它们之间有相当大的间距,类似于下面的屏幕截图:
<div class="images">
<img src="https://s7.postimg.cc/abhy97dln/stripe.png" alt="" width="120" height="20" class="alignleft size-full wp-image-7013">
<img src="https://s7.postimg.cc/8wgdkj9yj/global-franchise.png" alt="" width="120" height="20" class="alignleft size-full wp-image-7019">
<img src="https://s7.postimg.cc/ros8o6ynv/intuit_v1.png" alt="" width="150" height="44" class="alignleft size-full wp-image-7088">
<img src="https://s7.postimg.cc/6rw0jodjf/Franchise_Harbor.png" alt="" width="120" height="20" class="alignleft size-full wp-image-7068">
<img src="https://s7.postimg.cc/ngxgf2f4b/Intercom.png" alt="" width="120" height="20" class="alignleft size-full wp-image-7070">
<img src="https://s7.postimg.cc/qb0lshepn/Inc.png" alt="" width="120" height="20" class="alignleft size-full wp-image-7071">
<img src="https://s7.postimg.cc/6rw0jm8dn/Pay_Stand.png" alt="" width="120" height="20" class="alignleft size-full wp-image-7072">
</div>
我尝试过的 CSS 代码(但它不起作用)以便将图像列表放在一条直线上,并留出相当大的间距: p>
.images
{
display: flex;
align-items: center;
background-repeat: no-repeat;
background-size: cover;
justify-content: center;
}
.images img
{
padding-left: 2%;
padding-right: 2%;
}
使用上面的 CSS 代码,图像确实位于中心,但似乎完全缩小了。
问题陈述:
我想知道我应该在小提琴中添加哪些 CSS 代码,以便图像列表以直线显示,彼此之间有相当大的间距。
【问题讨论】: