位置:在 iOS safari 上滚动时,粘性内容消失且元素消失
顶部有一个 position: Sticky
元素,内容溢出。当过度滚动页面时,发生了一些事情。
一开始,粘性元素的内容消失了。
然后,粘性元素消失了
任何人都可以解释一下
或你可以自己尝试这个 示例
来源:
<body>
<div class="main">
<div class="tabs">
<div class="item">101vw sticky</div>
</div>
</div>
</body>
<style>
.main {
height: 100vh;
}
.tabs {
position: sticky;
top: 0;
overflow-x: auto;
}
.item {
width: 101vw;
}
</style>
there is a position: sticky
element on top, which content is overflowed. when over scrolling the page, something wired happend
In the beginning, content of sticky element disappeared.
and then, sticky element disappeared
can anybody explain this
or you can try this example by yourself
source:
<body>
<div class="main">
<div class="tabs">
<div class="item">101vw sticky</div>
</div>
</div>
</body>
<style>
.main {
height: 100vh;
}
.tabs {
position: sticky;
top: 0;
overflow-x: auto;
}
.item {
width: 101vw;
}
</style>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论