问问老大们,这个li包着的a盒子左边为什么有一大块空白,把元素挤了过去,调了一下也不是margin和padding的问题,www秋梨膏


<ul>
<li v-for="item in item.goods" :key="item.id">
<RouterLink to="/">
<img :src="item.picture" alt="" />
<div class="info">
<p class="name">{{ item.name }}</p>
<p class="desc">{{ item.desc }}</p>
<span class="price"><i>¥</i>{{ item.price }}</span>
</div>
</RouterLink>
</li>
</ul>

ul {
display: flex;
flex-wrap: wrap;
li {
width: 310px;
height: 120px;
margin-right: 15px;
margin-bottom: 15px;
border: 1px solid #eee;
border-radius: 4px;
background: #fff;
&:nth-child(3n) {
margin-right: 0;
}
a {
display: flex;
width: 100%;
height: 100%;
align-items: center;
padding: 10px;
color: #000;
&:hover {
background: #e3f9f4;
}
img {
width: 95px;
height: 95px;
}
.info {
padding-left: 10px;
line-height: 24px;
overflow: hidden;
.name {
font-size: 15px;
color: #666;
}
.desc {
font-size: 14px;
color: #999;
}
.price {
font-size: 22px;
color: $priceColor;
i {
font-size: 16px;
}
}
}
}
}
}
}

