小程序CSS 一行三列布局
作者:xlnxin发布时间:2025-03-12分类:编程知识浏览:6
导读:1、grid网格布局.num-wrap { // grid网格布局 display: grid;...
1、grid网格布局
.num-wrap { // grid网格布局 display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 10px; } .num-item { background-color: #CB812E; color: #ffffff; height: 80px; }
2、flex弹性布局 + 伪类选择器
.num-wrap { // flex弹性布局 display: flex; flex-wrap: wrap; } .num-item { background-color: #CB812E; color: #ffffff; height: 80px; width: calc((100% - 20px) / 3); margin-right: 10px; margin-top: 10px; } // 使用css 伪类选择器 .num-item:nth-child(3n) { margin-right: 0; }
- 上一篇:微信小程序animation底部弹窗动画css代码
- 下一篇:php字符串分隔为数组
相关推荐
- 微信小程序animation底部弹窗动画css代码
- 微信小程序自定义底部、顶部、中间、左边及右边弹窗
- 小程序component使用app.wxss
- 微信小程序引用 vant weapp calendar选择器
- 微信小程序表单各种组件源代码
- 小程序img_sec_check图片检测出行"errcode":47001错误解决方法
- 双击excel打开不显示任何内容,只能在excel里面打开文件解决方法
- 小程序saveVideoToPhotosAlbum安卓手机可以下载MP4苹果手机不能下载解决方法
- 小程序逆向错误之 typeof3 is not a function
- 小程序e.target.dataset和e.currentTarget.dataset区别
- 编程知识排行
- 最近发表