解决IOS中h5页面拉到最下边会漏浏览器自带的白底

<template v-if="newPatient">
   <div class='index'>
           内容
    </div>    
</template>   
<style>
html,body {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}
.index {
  background-color: #ff9a71;
  overflow-y: auto;
  height:100vh;
  position: fixed;
  top:0;
  background-repeat: no-repeat;
}
</style> 
mounted中再加一句JS代码:
document.documentElement.style.overflow='hidden';

 

上一篇:超出宽度显示...


下一篇:element表格左右滚动条在总计的上面怎么解决