微信小程序 MiniProgram
index.wxml
<view class="image-logo"></view>
index.wxss
.image-logo {
background: url('https://hwcdn-wxapplet.mybody1996.com/mybody_miniprogram/order/logo.png') no-repeat center;
background-size: 100% 100%;
width: 246rpx;
height: 40rpx;
display: inline-block;
position: relative;
}
调整点:
width,height,要跟图标的尺寸一致,否则会变形