可以用行内来实现
<view class="warp" style="background-image:
url(\'../../images/welcome.png\')">
</view>
应用代码如下:
<view class="scan_back" style="background-image:url(\'../../image/codescan_trans.png\')"> <button bindtap="click" class="scan_btn" style=\'color:white\' plain=\'true\' >扫码</button> <view>{{show}}</view> </view>
效果图如左。