iphone 微信浏览器上拽拽异常、失效问题(直接贴代码)

fixed解决方案

html {
width: 100%;
background-color: plum;
}

body {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.other {
position: fixed;
width: 100%;
height: 5rem;
line-height: 5rem;
text-align: center;
background-color: orangered;
z-index: 10000;
}

.container2 {
width: 100%;
height: 100%;
margin-top: 5rem;
margin-bottom: 3rem;
box-sizing: border-box;
background-color: greenyellow;
}

.container2 .item {
height: 4rem;
line-height: 4rem;
text-align: center;
border-bottom: solid 2px gray;
}

.button {
position: fixed;
bottom: 0;
width: 100%;
height: 3rem;
line-height: 3rem;
text-align: center;
background-color: #00b3ee;
}

其 他
项目0
项目1
项目2
项目3
项目4
项目5
项目6
项目7
项目8
项目9
按 钮

window.addEventListener(‘resize’, resetFontSize, false);
resetFontSize();

var $container2 = document.querySelector(’.container2’);
var $other = document.querySelector(’.other’);
var $button = document.querySelector(’.button’);
$container2.style.height = (document.documentElement.clientHeight - $other.clientHeight - $button.clientHeight) + ‘px’;
var myScroll = new IScroll(’#container2’, {
mouseWheel: true,
scrollbars: true
});

你可能感兴趣的:(微信公众号,微信浏览器,javaScript)