微信小程序多张image图片排列有空隙解决方案

阅读 171

2022-09-22


 


.det-pics-w image {
width: 100%;
min-height: 630rpx;
}

.det-pics-w {
position: relative;
}

第一种解决方案:flex

.det-pics-w image {
width: 100%;
min-height: 630rpx;
}

.det-pics-w {
position: relative;
display: flex;
flex-direction: column;
}

第二种解决方式:margin-top负值

.det-pics-w image {
width: 100%;
min-height: 630rpx;
margin-top: -12rpx;
}

.det-pics-w {
position: relative;
}

两种都可以去掉这个间隙。效果如下

微信小程序多张image图片排列有空隙解决方案_解决方案

 

 

QQ群:  1102727334

精彩评论(0)

0 0 举报