zoukankan      html  css  js  c++  java
  • flex 纵向布局,垂直换行,没有撑开父盒子宽度,求解??

    1、html

     <div class="cardBox" v-for="(item,idx) in arr" :key="idx">
              <div class="cart-left">
                <div class="cart-left-head">
                  <h3>{{item.name}}</h3>
                </div>
                <div class="cart-left-body">
                  <div class="cart-left-body-text" v-for="(itemText,i) in item.infoPointData" :key="i">
                    <span class="text-title">{{itemText.aa}}:</span>
                    <span class="text-key">{{itemText.ab}}</span>
                  </div>
                </div>
              </div>
              <div class="card-right">
                  <!-- <img src="../../../assets/images/red_star/cistern_open.png" alt=""> -->
              </div>
    

      

    2、css

        .cardBox {
            height: 164px;
            border: 1px solid #333;
            padding: 10px;
            display: flex;
            justify-content: space-between;
    
    
            .cart-left {
              padding: 20px 0 0px 20px;   
              .cart-left-head {
                h3 {
                  font-size: 16px;
                  color: rgba(51, 51, 51, 1);
                  line-height: 21px;
                }
              }
    
              .cart-left-body {
                padding-top: 16px;
                height: 114px;
        
                display: flex;
                flex-direction: column;
                flex-wrap: wrap;
    
                .cart-left-body-text {
                  padding-bottom: 8px;
                  margin-right: 20px;
    
                  .text-title {
                    font-size: 14px;
                    font-family: PingFangTC-Regular, PingFangTC;
                    font-weight: 400;
                    color: rgba(153, 153, 153, 1);
                    line-height: 20px;
                  }
                  .text-key {
                    font-size: 14px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: rgba(51, 51, 51, 1);
                    line-height: 20px;
                  }
                }
              }
            }
    
            .card-right {
            //    90px;
            }
          }
    

      

    3、效果

  • 相关阅读:
    Jquery同步载入数据
    fireEvent方法
    条件判断问题,不太清楚有什么区别!
    Request.QueryString,Request.Form与JavaScript中模态窗口传参
    SQL求百分比
    event.srcElement
    判断输入信息为数值类型
    SQL 表变量,临时表
    读写二进制文件
    串口通信
  • 原文地址:https://www.cnblogs.com/anbozhu7/p/13188670.html
Copyright © 2011-2022 走看看