卡顿或白屏原因:
小程序列表页面图片过多,数据加载多了或者手机滑动快都会出现卡顿现象,有时还会出现屏幕短暂白屏
如果你的img标签上用了 mode='aspectFill' 属性,那么就会造成卡顿
解决方案:
使用背景图(前提是网络图片,小程序不支持本地图片做背景图)
样式代码:
width:200rpx;
height:200rpx;
background-position: center center;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
这些css样式既可以解决卡顿问题,又可以不用mode属性 图片不被压缩