202206-22|微信小程序-image加载图片工具中显示,真机中不显示
【摘要】 主页:小王叔叔的博客支持:点赞👍关注✔️收藏💖在微信小程序中,加载图片时,image真机中不显示图片解决:将图片用英文命名,不用正文命名,即可解决。代码:.wxml <!-- 页面下端功能列表 --><view class="container"> <view class="contain_panel1"> <view class="contain_img1"> <im...
主页:小王叔叔的博客
支持:点赞👍关注✔️收藏💖
在微信小程序中,加载图片时,image真机中不显示图片
解决:将图片用英文命名,不用正文命名,即可解决。
代码:
.wxml
<!-- 页面下端功能列表 -->
<view class="container">
<view class="contain_panel1">
<view class="contain_img1">
<image src="../images/functionlists/kaoqin.png" />
</view>
</view>
<view class="contain_panel2">
<view class="contain_img2">
<image src="../images/functionlists/kaoqin_tongji.png" />
</view>
</view>
<view class="contain_panel3">
<view class="contain_img3">
<image src="../images/functionlists/kaoqin_qingjia.png" />
</view>
</view>
</view>
<view class="container2">
<view class="contain_font1">
<text>考勤打卡</text>
</view>
<view class="contain_font2">
<text>考勤统计</text>
</view>
<view class="contain_font3">
<text>考勤请假</text>
</view>
</view>
<view class="container3">
<view class="contain_panel4">
<view class="contain_img4">
<image src="../images/functionlists/map.png" class="contain-image" />
</view>
</view>
<view class="contain_panel5">
<view class="contain_img5">
<image src="../images/functionlists/sports.png" />
</view>
</view>
<view class="contain_panel6">
<view class="contain_img6">
<image src="../images/functionlists/scan.png" />
</view>
</view>
</view>
<view class="container4">
<view class="contain_font4">
<text>地图</text>
</view>
<view class="contain_font5">
<text>运动</text>
</view>
<view class="contain_font6">
<text>扫一扫</text>
</view>
</view>
kaoqin.png" /> </view> </view> <view class="contain_panel2"> <view class="contain_img2"> <image src="../images/functionlists/kaoqin_tongji.png" /> </view> </view> <view class="contain_panel3"> <view class="contain_img3"> <image src="../images/functionlists/kaoqin_qingjia.png" /> </view> </view> </view> <view class="container2"> <view class="contain_font1"> <text>考勤打卡</text> </view> <view class="contain_font2"> <text>考勤统计</text> </view> <view class="contain_font3"> <text>考勤请假</text> </view> </view> <view class="container3"> <view class="contain_panel4"> <view class="contain_img4"> <image src="../images/functionlists/map.png" class="contain-image" /> </view> </view> <view class="contain_panel5"> <view class="contain_img5"> <image src="../images/functionlists/sports.png" /> </view> </view> <view class="contain_panel6"> <view class="contain_img6"> <image src="../images/functionlists/scan.png" /> </view> </view> </view> <view class="container4"> <view class="contain_font4"> <text>地图</text> </view> <view class="contain_font5"> <text>运动</text> </view> <view class="contain_font6"> <text>扫一扫</text> </view> </view>
.wxss
效果:
工具显示:
真机显示:图片经过压缩,调节高/宽像素
转载声明:本文为博主原创文章,未经博主允许不得转载。
⚠️注意 ~
💯本期内容就结束了,如果内容有误,麻烦大家评论区指出!
如有疑问❓可以在评论区💬或私信💬,尽我最大能力🏃♀️帮大家解决👨🏫!
如果我的文章有帮助到您,欢迎点赞+关注✔️鼓励博主🏃,您的鼓励是我分享的动力🏃🏃🏃~
【版权声明】本文为华为云社区用户原创内容,未经允许不得转载,如需转载请自行联系原作者进行授权。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)