滚动时固定元素触底停止,Safari 11.1兼容的jQuery方案需求
Hey folks, here's an update on my journey to get that sticky sidebar working properly:
- I’ve tested using CSS
position: sticky, but it completely fails to work in Safari 11.1. - Since Safari makes up the largest share of our user base, a pure CSS approach just isn’t going to cut it for us. I’m still hunting for a jQuery-based solution instead.
- While Michał Sadowski’s answer was super helpful in pointing me in some good directions, what I actually need is a specific behavior: the sidebar should stay fixed as the user scrolls, but once it reaches the footer, it should stop being fixed and scroll along with the rest of the page.
- Currently, I’m referencing the code from the solution called Make scrolling sidebar stop at footer—my CSS and HTML match exactly what’s in the fiddle example for that solution.
内容的提问来源于stack exchange,提问作者Jay-oh
相关产品推荐
相关产品推荐

