//自适应手机屏幕高度js(trunk的登录页面)
var screenHeight = document.documentElement.clientHeight;
mui.alert(screenHeight);
screenHeight-= 100;//解决手机下方自带高度(带有返回键的地方)
var body = document.getElementsByTagName('body')[0];
body.style.height = screenHeight + "px";
//实现页面反弹效果js(仅适应于mui)
mui('.mui-scroll-wrapper').scroll({
scrollY: true, //是否竖向滚动
scrollX: false, //是否横向滚动
startX: 0, //初始化时滚动至x
startY: 0, //初始化时滚动至y
indicators: false, //是否显示滚动条
deceleration: 0.0010, //阻尼系数,系数越小滑动越灵敏
bounce: true //是否启用回弹
});
(一定要用这两行代码包裹)
<div class="mui-scroll-wrapper " >
<div class="mui-scroll">
</div>
</div>