我在我的网站上有一个固定位置的模态框和灵活的布局,用户可以在其中输入内容。我已将 overscroll-behaviour-y: none
添加到模式中,以防止基础页面滚动并抑制文本内容滚动时的刷新。虽然,它适用于 chrome,但它不适用于 webview,导致当用户键入大量数据并尝试向上滚动时页面刷新。我已经尝试将 overscroll-behaviour
属性包含在所有父元素中,包括 html 和 body,但它没有效果。我的方法有问题吗?
这是我的示例模态 CSS
position: fixed;
z-index: 110;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: white;
overscroll-behavior-y: none;
z-index: 115;
display: flex;
overflow: hidden;
flex-direction: column;
justify-content: space-between;
最佳答案
根据: https://caniuse.com/#feat=css-overscroll-behavior
Safari 仍然不支持此 Prop ,仅供引用。
关于html - overscroll-behavior 属性不适用于 webview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51745071/