当前位置:网站首页>【微信小程序--解决display:flex最后一行对齐问题。(不连续排列会分到两边)】
【微信小程序--解决display:flex最后一行对齐问题。(不连续排列会分到两边)】
2022-07-29 04:54:00 【常安cc】
微信小程序–解决display:flex最后一行对齐问题。(不连续排列会分到两边)
修改前
<view class="addr-box">
<view wx:for="{
{socketTypeData.val}}" wx:key="index" class="addr-item {
{index==socketTypeData.itemIndex?'selectedItem':''}}" data-dialogid="{
{index}}" catchtap="getValueTapSocketTypeData">{
{item}}</view>
</view>
.addr-box {
height: auto;
box-sizing: border-box;
padding: 16rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}
.addr-item {
width: 30%;
height: 64rpx;
line-height: 64rpx;
text-align: center;
background: #F4F6F5;
border: 1px solid #F4F6F5;
opacity: 1;
border-radius: 32rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #151521;
opacity: 1;
box-sizing: border-box;
margin-bottom: 24rpx;
}
修改后
/* 解决最后一排分开排列 */
.addr-box:after {
content: "";
width: 30%;//和上面的宽度时间
}
边栏推荐
- Download addresses of various versions of MySQL and multi version coexistence installation
- RecyclerView通过DPAD按键上下切换焦点 切换到界面外的控件时焦点会左右乱跳
- WPS如何进行快速截屏?WPS快速截屏的方法
- Recommendation system of online education
- Take you to understand JS array
- Learn matlab to draw geographical map, line scatter bubble density map
- Conv1d of torch
- Go memory model for concurrency
- Using jupyter (I), install jupyter under windows, open the browser, and modify the default opening address
- Mujoco and mujoco_ Install libxcursor.so 1:NO such dictionary
猜你喜欢
Auto.js脚本开发环境搭建
stack和queue和优先级队列(大堆和小堆)模拟实现和仿函数讲解
Learn matlab to draw geographical map, line scatter bubble density map
Reveal安装配置调试
安装spinning up教程里与mujoco对应的gym,报错mjpro150
Climbing the pit of traffic flow prediction (II): the simplest LSTM predicts traffic flow using tensorflow2
Command line interactive tools (latest version) inquirer practical tutorial
ios面试准备 - 网络篇
使用更灵活、更方便的罗氏线圈
学术 | [LaTex]超详细Texlive2022+Tex Studio下载安装配置
随机推荐
How to set row height and column width in excel? The method of setting row height and column width in Excel
Mujoco and mujoco_ Install libxcursor.so 1:NO such dictionary
Stack and queue and priority queue (large heap and small heap) simulation implementation and explanation of imitation function
RecyclerView通过DPAD按键上下切换焦点 切换到界面外的控件时焦点会左右乱跳
How to open IE browser by running win command
GCC基础知识
Exception - ...MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is ...
常见的限流方式
使用近场探头和电流探头进行EMI干扰排查
让你的正则表达式可读性提高一百倍
五个关联分析,领略数据分析师一大重要必会处理技能
Mysql:the user specified as a definer ('root '@'%) does not exist
SSM integration, addition, deletion, modification and query
Mysql:The user specified as a definer (‘root‘@‘%‘) does not exist 的解决办法
如何安装office2010安装包?office2010安装包安装到电脑上的方法
ios面试准备 - objective-c篇
Improve the readability of your regular expressions a hundred times
2022杭电多校联赛第四场 题解
Excel卡住了没保存怎么办?Excel还没保存但是卡住了的解决方法
The most complete NLP Chinese and English stop words list in the whole station (including punctuation marks, which can be copied directly)