获取屏幕宽度(高度相对应 height)
方法1
imageLoad: function () {
this.setData({
imageWidth: wx.getSystemInfoSync().windowWidth
})
}
方法
.imgClass{
width: 100vw;
vw 表示 view width,vh 表示 view height
前面的数字表示百分比
获取屏幕宽度(高度相对应 height)
方法1
imageLoad: function () {
this.setData({
imageWidth: wx.getSystemInfoSync().windowWidth
})
}
方法
.imgClass{
width: 100vw;
vw 表示 view width,vh 表示 view height
前面的数字表示百分比