当前位置:网站首页>微信小程序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;
}边栏推荐
- 厦门灌口镇田头村特色农产品 甜头村特色农产品蚂蚁新村7.1答案
- NPDP能给产品经理带来什么价值?你都知道了吗?
- 写在Doris毕业后的第一天
- The data in the database table recursively forms a closed-loop data. How can we get these data
- Configuration of ZABBIX API and PHP
- 《QT+PCL第六章》点云配准icp系列6
- Solidty智能合约开发-简易入门
- Flink 系例 之 TableAPI & SQL 与 MYSQL 插入数据
- Tableapi & SQL and Kafka message insertion in Flink
- k8s部署redis哨兵的实现
猜你喜欢

Basic use process of cmake

Chapter 4 of getting started with MySQL: creation, modification and deletion of data tables

Opencv Learning Notes 6 -- image mosaic

Task. Run(), Task. Factory. Analysis of behavior inconsistency between startnew() and new task()

互联网医院系统源码 医院小程序源码 智慧医院源码 在线问诊系统源码

炎炎夏日,这份安全用气指南请街坊们收好!

What are the books that have greatly improved the thinking and ability of programming?

微服务追踪SQL(支持Isto管控下的gorm查询追踪)

Rearrangement of overloaded operators

It's settled! 2022 Hainan secondary cost engineer examination time is determined! The registration channel has been opened!
随机推荐
Error-tf. function-decorated function tried to create variables on non-first call
保证生产安全!广州要求危化品企业“不安全不生产、不变通”
选择在长城证券上炒股开户可以吗?安全吗?
cmake 基本使用过程
《QT+PCL第六章》点云配准icp系列2
Junda technology indoor air environment monitoring terminal PM2.5, temperature and humidity TVOC and other multi parameter monitoring
竣达技术丨多台精密空调微信云监控方案
[leetcode 324] 摆动排序 II 思维+排序
go-zero实战demo(一)
Opencv learning notes 5 -- document scanning +ocr character recognition
[leetcode] 16. The sum of the nearest three numbers
tensorflow2-savedmodel convert to tflite
Word2vec yyds dry goods inventory
炎炎夏日,这份安全用气指南请街坊们收好!
《QT+PCL第六章》点云配准icp系列3
Opencv learning note 4 -- bank card number recognition
数据产品经理需要掌握哪些数据能力?
tensorflow2-savedmodel convert to pb(frozen_graph)
MySQL审计插件介绍
The solution to turn the newly created XML file into a common file in idea