1. 使用绝对定位
滚动元素使用绝对定位
{
position:absolute;
top:0;
left:0;
bottom:0;
height:100vh;
overflow-y:srcoll;
}
2. 添加兼容样式
{
-webkit-overflow-scrolling: touch;
}
3. iframe
当嵌套了iframe时,经常遇到iframe无法滚动,可以将引用的html样式高度设置为100vh,让其内部滚动
总结
以上方法不一定100%可以解决,如无法解决可以尝试js动态设置.最后只想说ios一生之敌!!!