小程序
小游戏
企业微信
微信支付
扫描小程序码分享
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
布局问题
代码贴出来
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
布局问题
代码贴出来
<!--pages/access/selectCabinet/selectCabinet.wxml--> <view class='top-horizontal-line' /> <view class='container'> <view class='cabinet-desc'>{{selectCabinetDesc}}</view> <view class='container-content'> <view class='cabinet-p' style="height:{{scrollHeight}}px;{{boxList.length==1 ? 'justify-content: center;' : 'justify-content: space-between;'}} "> <view wx:for='{{boxList}}' wx:key='item' class="{{item.bindStatus==0 ? 'cabinet-bg-green' : 'cabinet-bg-gray'}} " data-item='{{item}}' bindtap='onOpen'>{{item.name}}</view> </view> </view> </view>
/* pages/access/selectCabinet/selectCabinet.wxss */ .cabinet-desc { width: 100%; font-size: 36rpx; text-align: center; color: #222; margin-top: 24rpx; } .container-content { width: 100%; height: auto; align-items: center; justify-content: center; display: flex; } .cabinet-p { width: 480rpx; display: flex; justify-content: center; align-items: center; flex-flow: row wrap; align-content: center; min-height: max-content; } .cabinet-bg-green { width: 180rpx; height: 180rpx; color: #ffffff; font-size: 56rpx; border-radius: 50%; background: #4ec282; text-align: center; line-height: 180rpx; margin-top: 20rpx; margin-bottom: 30rpx; margin-left: 30rpx; margin-right: 30rpx; } .cabinet-bg-gray { width: 180rpx; height: 180rpx; color: #ffffff; font-size: 56rpx; border-radius: 50%; background: #eee; text-align: center; line-height: 180rpx; margin-top: 20rpx; margin-bottom: 30rpx; margin-left: 30rpx; margin-right: 30rpx;