两个不同大小的字想底部对齐 css前端开发
display: flex;
align-items: baseline;
<view class="main-price-view">
<label class="price-unit">¥</label>
<label class="price-title">100</label>
</view>
.main-price-view{
font-family: PingFang SC, PingFang SC;
font-weight: 600;
font-size: 40rpx;
color: #333333;
text-align: left;
display: flex;
align-items: baseline;
.price-unit{
font-size: 20rpx;
color: rgba(226, 30, 49, 1);
// margin-bottom: 10rpx;
}
.price-title{
font-weight: 600;
font-size: 40rpx;
color: rgba(226, 30, 49, 1);
}
}
原文地址:https://blog.csdn.net/qq_46376192/article/details/145211952
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!