html 列表排版,css列表排版

bVbv0CN?w=398&h=631

想要达到每一行图片宽度一样,间距也是一样的,请问需要怎么写啊?

html结构

v-for="item in list.data"

:key="item.key"

@click="handleToDetail(item)"

class="list"

>

{{ item.name }}
{{ item.desc }}

css

.list {

display inline-block

width 33.3%

height 24vh

margin-top 8px

&__box {

height 100%

width 90%

margin 0 auto

&__img {

height 70%

background-color #fff

border 1px solid #ccc

img {

width 100%

height 100%

}

}

}

.info {

height 30%

&__title {

width 100%

overflow hidden

white-space nowrap

text-overflow ellipsis

text-indent 1em

line-height 2em

font-size 14px

color #000

margin-top: 4px

}

&__author {

text-align right

margin-right 8px

.van-icon {

vertical-align -1px

margin-right 8px

}

}

}

}

怎么写都不对劲,有好的方法吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值