>>跟着b站up主“咸虾米_”学习微信小程序开发中,把学习记录存到这方便后续查找。
课程连接:
https://www.bilibili.com/video/BV19G4y1K74d?p=12&vd_source=9b149469177ab5fdc47515e14cf3cf74
一、通用属性
https://developers.weixin.qq.com/miniprogram/dev/component/image.html
二、mode例子
1、缩放
<image src="../../static/image/1.jpg" mode="widthFix"/>
<image src="../../static/image/1.jpg" mode="aspectFit"/>
<image src="../../static/image/2.jpg" mode="heightFix"/>
<image src="../../static/image/2.jpg" mode="aspectFill"/>
2、裁剪
<image src="/static/image/gif1.gif" mode="top"/>
<image src="https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg" mode="top right"/>
原图 裁剪后