码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 微信小程序03-文字一左一右显示,行内块元素居中


     效果展示

     实现程

     WXML 文件:

    1. <view class="doctor">
    2. <view class="doctor-tit">
    3. <view class="left-tit">医生推荐</view>
    4. <view class="right-tit">查看更多></view>
    5. </view>
    6. <view class="doctor-list">
    7. <view class="list">
    8. <image class="doctor-pic" src="../../images/center.png"></image>
    9. <view class="doctor-name">赵医师</view>
    10. </view>
    11. <view class="list">
    12. <image class="doctor-pic" src="../../images/center.png"></image>
    13. <view class="doctor-name">陈医师</view>
    14. </view>
    15. <view class="list">
    16. <image class="doctor-pic" src="../../images/center.png"></image>
    17. <view class="doctor-name">刘医师</view>
    18. </view>
    19. </view>
    20. </view>

    WXSS样式:

    01 文字左右显示

         display: flex;
         justify-content: space-between;

    02 盒子居中显示

         display : flex;
         justify-content : space-around;

    1. /* 医生推荐 */
    2. .doctor-tit {
    3. height: 20px;
    4. padding: 15px;
    5. display: flex;
    6. justify-content: space-between;
    7. }
    8. .left-tit {
    9. font-size: 14pt;
    10. text-align: justify;
    11. }
    12. .right-tit {
    13. margin-top: 5px;
    14. font-size: 10pt;
    15. color: #b2b2b2;
    16. }
    17. .doctor-list {
    18. display : flex;
    19. width: 100%;
    20. background-color: #fff;
    21. justify-content : space-around;
    22. }
    23. .list {
    24. width: 30%;
    25. height: 150px;
    26. border: 1px solid red;
    27. text-align: center;
    28. }
    29. .list .doctor-pic {
    30. width: 100%;
    31. height: 120px;
    32. }
    33. .list .doctor-name {
    34. font-size: 12pt;
    35. }
  • 相关阅读:
    基于ssm(非maven)学生考勤管理系统
    著名数字音频工作站FL Studio 21.0.3.3517中文破解安装图文激活教程
    深度学习--PyTorch定义Tensor以及索引和切片
    vue静态资源的引用(相对路径,绝对路径,@,~的一些笔记,以图片引入为例,含在线演示)
    Kotlin协程最佳实践
    java计算机毕业设计销售合同管理系统源代码+数据库+系统+lw文档
    vue <el-checkbox-group>多选框回显
    C#命名空间 System.IO思维导图
    springboot+vue.js+Elementui大众校友社交系统java校友会网站
    基于el-form实现自动展开/收起的查询条件组件
  • 原文地址:https://blog.csdn.net/qq_32845825/article/details/125485742
  • 最新文章
  • 沪漂五周年了:我越来越迷茫了
    Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文
    MySQL-Seconds_behind_master的精度误差
    [MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间
    AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊
    Agent OS :五种驯服不确定性的范式
    PortSwigger SQL注入LAB11
    数据库即时编译JIT
    [Begin]AI Learn Data Day 0
    深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号