有個電商的業(yè)務需要在ios和安卓上顯示價錢,所以需要人民幣符號碘耳,
網(wǎng)上查了多種方式,更改字體框弛、使用¥
辛辨、使用半角人民幣符號,在實際測試過程中,發(fā)現(xiàn)安卓手機還是只能顯示一橫斗搞,沒辦法 只能使用圖片了指攒。
<div>
<span class="txt">秒殺價</span>
<span class="price">77.09</span>
</div>
.txt {
position: relative;
}
.txt:after {
position: absolute;
content: '';
display: inline-block;
background: url("./img/yen.png") no-repeat;
background-size: contain;
width: 15px;
height: 15px;
transform: translateY(-50%);
top: 50%;
}
.price {
margin-left: 15px;
}
人民幣符號圖片可以在iconfont下載
人民幣符號圖片
參考資料:
直接拷貝半角人民幣符號