cover-view的css问题(flex)
即便去掉cover-view本身的换行样式也不行
求解。
(发帖的标签应该包含所有组件名吧,找都找不到)
9 回复
wxml (map组件里面)
< cover-view class = "users" wx:if = '{{debug}}' > < cover-view class = 'users-title' >请选择你的她</ cover-view > < cover-view class = "user-list" > < cover-view class = "user-item" > < cover-image class = 'img' src = 'http://qnimg.pianke.me/5fb30002fce3d35b415f715dda88344820171011.jpg?imageView2/2/w/300/format/jpg' ></ cover-image > < cover-view >无敌是多么寂寞</ cover-view > </ cover-view > < cover-view class = "user-item" > < cover-image class = 'img' src = 'http://qnimg.pianke.me/5fb30002fce3d35b415f715dda88344820171011.jpg?imageView2/2/w/300/format/jpg' ></ cover-image > < cover-view >无敌是多么寂寞</ cover-view > </ cover-view > < cover-view class = "user-item" > < cover-image class = 'img' src = 'http://qnimg.pianke.me/5fb30002fce3d35b415f715dda88344820171011.jpg?imageView2/2/w/300/format/jpg' ></ cover-image > < cover-view >无敌是多么寂寞</ cover-view > </ cover-view > //...省略多个 </ cover-view > </ cover-view > |
wxss
.users{ width : 70% ; height : 300 rpx; background-color : rgba( 136 , 136 , 136 , 0.7 ); position : absolute ; left : 15% ; top : 30% ; font-size : 25 rpx; } .users-title{ width : 100% ; color : white ; margin : 6 rpx 0 ; text-align : center ; } .user-list{ width : 100% ; margin : 6 rpx; display : flex; flex-wrap: wrap; } .user-item{ width : 30% ; color : white ; } |
效果是这样的: