当前位置:网站首页>微信小程序03-文字一左一右显示,行内块元素居中
微信小程序03-文字一左一右显示,行内块元素居中
2022-07-01 15:09:00 【蹦跶哒的王小哲】
效果展示

实现程
WXML 文件:
<view class="doctor">
<view class="doctor-tit">
<view class="left-tit">医生推荐</view>
<view class="right-tit">查看更多></view>
</view>
<view class="doctor-list">
<view class="list">
<image class="doctor-pic" src="../../images/center.png"></image>
<view class="doctor-name">赵医师</view>
</view>
<view class="list">
<image class="doctor-pic" src="../../images/center.png"></image>
<view class="doctor-name">陈医师</view>
</view>
<view class="list">
<image class="doctor-pic" src="../../images/center.png"></image>
<view class="doctor-name">刘医师</view>
</view>
</view>
</view>WXSS样式:
01 文字左右显示
display: flex;
justify-content: space-between;
02 盒子居中显示
display : flex;
justify-content : space-around;
/* 医生推荐 */
.doctor-tit {
height: 20px;
padding: 15px;
display: flex;
justify-content: space-between;
}
.left-tit {
font-size: 14pt;
text-align: justify;
}
.right-tit {
margin-top: 5px;
font-size: 10pt;
color: #b2b2b2;
}
.doctor-list {
display : flex;
width: 100%;
background-color: #fff;
justify-content : space-around;
}
.list {
width: 30%;
height: 150px;
border: 1px solid red;
text-align: center;
}
.list .doctor-pic {
width: 100%;
height: 120px;
}
.list .doctor-name {
font-size: 12pt;
}边栏推荐
- Intelligent operation and maintenance practice: banking business process and single transaction tracking
- Tableapi & SQL and MySQL grouping statistics of Flink
- Ensure production safety! Guangzhou requires hazardous chemical enterprises to "not produce in an unsafe way, and keep constant communication"
- 炎炎夏日,这份安全用气指南请街坊们收好!
- Tableapi & SQL and MySQL insert data of Flink
- IDEA全局搜索快捷键(ctrl+shift+F)失效修复
- MySQL 服务正在启动 MySQL 服务无法启动解决途径
- The State Administration of Chia Tai market supervision, the national development and Reform Commission and the China Securities Regulatory Commission jointly reminded and warned some iron ores
- leetcode:329. Longest increasing path in matrix
- Cannot link redis when redis is enabled
猜你喜欢

《QT+PCL第六章》点云配准icp系列2

Internet hospital system source code hospital applet source code smart hospital source code online consultation system source code
![[advanced ROS] lesson 5 TF coordinate transformation in ROS](/img/4d/ae7d477bf6928005e16f046d461dcb.png)
[advanced ROS] lesson 5 TF coordinate transformation in ROS

MySQL 服务正在启动 MySQL 服务无法启动解决途径

JVM第二话 -- JVM内存模型以及垃圾回收

竣达技术丨室内空气环境监测终端 pm2.5、温湿度TVOC等多参数监测

竣达技术丨多台精密空调微信云监控方案

Cannot link redis when redis is enabled

官宣:Apache Doris 顺利毕业,成为 ASF 顶级项目!
![[leetcode] 16. The sum of the nearest three numbers](/img/60/6a68333d6e543c601e6ed586b830d0.png)
[leetcode] 16. The sum of the nearest three numbers
随机推荐
[advanced ROS] lesson 5 TF coordinate transformation in ROS
三十之前一定要明白的职场潜规则
Flink 系例 之 TableAPI & SQL 与 MYSQL 数据查询
音乐播放器开发实例(可毕设)
TypeScript:var
基于价值量化的需求优先级排序方法
TS报错 Don‘t use `object` as a type. The `object` type is currently hard to use
Introduction to MySQL audit plug-in
openssl客户端编程:一个不起眼的函数导致的SSL会话失败问题
JVM第一话 -- JVM入门详解以及运行时数据区分析
What are the test items of juicer ul982
《QT+PCL第六章》点云配准icp系列2
Digital transformation: data visualization enables sales management
【LeetCode】16、最接近的三数之和
MySQL审计插件介绍
What are the books that have greatly improved the thinking and ability of programming?
Error-tf. function-decorated function tried to create variables on non-first call
定了!2022海南二级造价工程师考试时间确定!报名通道已开启!
The State Administration of Chia Tai market supervision, the national development and Reform Commission and the China Securities Regulatory Commission jointly reminded and warned some iron ores
Zabbix API与PHP的配置