ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

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

2021-04-28 18:34:30  阅读:34  来源: 互联网

标签:会漏 IOS 100vh h5 repeat background overflow height hidden


<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';

 

标签:会漏,IOS,100vh,h5,repeat,background,overflow,height,hidden
来源: https://www.cnblogs.com/fkcqwq/p/14715279.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有