这是产品要实现的功能
我用flex 得出的效果:
img是由vue里面的 v-for渲染的,属于不可控的
相关代码如下:
.imgItem
display flex
flex-flow row wrap
img
width 104px
height 104px
margin 2px 2px
flex 1 1 100%
&:nth-child(1),&:nth-child(4),&:nth-child(7)
margin-left 0
&:nth-child(3),&:nth-child(6),&:nth-child(9)
margin-right 0
问下如何得到产品UI图的要求
刚好有你要的答案

https://segmentfault.com/a/11...
效果图
原理是一样的,你讲宽度啊定位3格即可