0
点赞
收藏
分享

微信扫一扫

view中的文字默认垂直偏上是为什么

alanwhy 2022-04-04 阅读 36
css

问题:设置-+水平和垂直居中,可以设置.num_edit属性:display: flex; justify_content: center; align-items: center;。请问:为啥不设置align-items: center属性的时候,要略微偏上一点
在这里插入图片描述
在这里插入图片描述

 <!-- 商品信息 -->
      <view class="cart_info_wrap">
        <view class="goods_name">TCL电视 49P3dfdf辅导费地方大幅度发辅导辅导辅导dfee发送到发的付首付的</view>
        <view class="goods_price_row">
          <view class="goods_price">¥999</view>
          <view class="cart_num_tool">
            <view class="num_edit">-</view>
            <view class="goods_num">1</view>
            <view class="num_edit">+</view>
          </view>
        </view>
      </view>
  .cart_info_wrap {
        flex: 4;
        .goods_name {
          display: -webkit-box;
          overflow: hidden;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2;
          color: #666;
        }
        .goods_price_row {
          display: flex;
          justify-content: space-between;
          .goods_price {
            color: var(--themeColor);
            font-size: 34rpx;
          }
          .cart_num_tool {
            display: flex;
            justify-content: center;
            align-items: center;
            .num_edit {
              display: flex;
              width: 55rpx;
              height: 55rpx;
              border: 1px solid #ccc;
            }
            .goods_num {

            }
          }
        }
      }
举报

相关推荐

0 条评论