问题:设置- 和+ 水平和垂直居中,可以设置.num_edit属性:display: flex; justify_content: center; align-items: center; 。请问:为啥不设置align-items: center属性的时候,要略微偏上一点 怎么view的高度设置为不同的值,文本距离上边的距离不变呢?
<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 {
}
}
}
}
|