微信小程序中wxss中使用background-image无效的问题

微信小程序中wxss中使用background-image无效的问题

**wxss中配置background-image,使用了本地图片作为背景图会无效,因为wxss不支持本地资源作为背景图,开发中为了看到效果,可以直接在页面结构中写行内样式来解决这个问题。

如:
<view class="advertising" style="background:url('../../static/images/status_active.png') no-repeat center">进行中</view>

猜你喜欢

转载自blog.csdn.net/weixin_47346395/article/details/107245023