css:
.priceBox {
display: flex;
align-items: flex-end;
width: 100%;
height: 40px;
text-align: center;
justify-content: center;
line-height: 1;
margin-top: -5px;
.price {
font-size: 28px;
font-weight: bold;
color: #cb1e36;
}
.rmbIcon {
width: 10px;
height: 12px;
background: url("~@/js/picture/rmb.png") no-repeat center;
background-size: 100% 100%;
margin-bottom: 5px;
margin-right: -5px;
}
.priceTip {
font-size: 12px;
color: #999999;
margin-bottom: 3px;
}
}
html:
<div class="priceBox" v-show="subItem.Price">
<div class="rmbIcon"></div>
<div class="price">
{{subItem.Price}}
</div>
<div class="priceTip" v-show="subItem.Price">起</div>
</div>
效果