Html
1、上下左右居中:
display: flex;
align-items: center; //上下居中
justify-content: center; //左右居中
2、图片自适应居中属性
object-fit:cover;
Mui
下拉刷新data-pullToRefresh:
var pullrefresh = mui.data[mui(".mui-scroll")[0].getAttribute("data-pullToRefresh")];
if(pullrefresh.loading == true){
//关闭下拉刷新
pullrefresh.endPullDownToRefresh();
}else{
//开启下拉刷新
pullrefresh.pullDownLoading();
}
下拉刷新mui-scroll-wrapper:
mui('#scroll3').pullRefresh().pulldownLoading();
mui('#scroll1').pullRefresh().endPulldownToRefresh();
Vue
1、vue绑定backgroundImage
v-bind:style="{backgroundImage:'url(' + item.pic + ')'}"