收藏
回答

为什么在wxml设置背景图片真机不显示

框架类型 问题类型 操作系统版本 手机型号 微信版本
小程序 Bug 12.1.0 iphone小米 7.0

- 当前 Bug 的表现(可
无背景图
截图)


在开发者工具中可以显示

- 预期表现


- 复现路径

背景图片是sa_bg.png

- 提供一个最简复现 Demo

<view class='serviceArea'>

<view class='serviceArea_title fontWeight'>服务地点</view>

<view class='serviceAreaList' style='background:url(../../images/sa_bg.png)  no-repeat center center;background-size:cover;'>

<view class='serviceItem' catchtap='outLink' data-index='{{index}}' wx:for="{{serviceList}}" wx:key="index">

<image class='serviceItemImage' src="{{item.picture}}"></image>

<text class='serviceItemText fontSize'>{{item.service_name}}</text>

</view>

</view>

</view>


回答关注问题邀请回答
收藏

3 个回答

  • 茂$。$
    茂$。$
    2019-01-11

    写到image标签里,做平铺,z-index:-1;

    2019-01-11
    有用 1
    回复
  • 疯狂的小辣椒
    疯狂的小辣椒
    2019-01-11

    背景图片不支持本地图片的

    2019-01-11
    有用
    回复
  • 极学者@陈序员
    极学者@陈序员
    2019-01-11

    你可以打印<image class='serviceItemImage' src="{{item.picture}}"></image>

    {{item.picture}} 看看 移动端 有没有异常?

    2019-01-11
    有用
    回复
登录 后发表内容