解决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';
标签:会漏,IOS,100vh,h5,repeat,background,overflow,height,hidden 来源: https://www.cnblogs.com/fkcqwq/p/14715279.html