Safari绝对定位div滚动时消失 [英] Safari absolute positioned div disappear when scroll

查看:183
本文介绍了Safari绝对定位div滚动时消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个侧边栏,其中包含电子商务网站上的一些产品过滤器,并且具有绝对位置。除iPad和iPhone上的Safari以外,它在所有浏览器上均可正常运行。当页面滚动时,它会随机消失。



我尝试使用 -webkit-transform:translate3d(0,0,0); 技巧,在许多文章和其他技巧中都有报道,但对我来说却无济于事。



您可以在 http://www.hardlyeverwornit.com/alexander-mcqueen



通过单击 REFINE,可在移动设备和iPad上看到侧边栏搜索按钮。类名称为 new-search-results-filters 。目前,我已经删除了 tranlate3d ... ,因为它无法正常工作。

解决方案

您是否使用任何调整大小事件来帮助您进行排名计算?如果是,请注意Safari有一个已识别的bug,在滚动时会随机触发resize事件。这会弄乱您的头寸计算。


I have a sidebar that contains some products filters on an ecommerce website and has an absolute position. It works well on all browsers except for Safari on iPad and iPhone. It randomly disappears when the page scrolls.

I have tried to use the -webkit-transform: translate3d(0, 0, 0); trick as reported in many articles and other "tricks", but nothing works for me.

(iPad Safari scrolling causes HTML elements to disappear and reappear with a delay)

You can see the page at http://www.hardlyeverwornit.com/alexander-mcqueen

The sidebar is visible on mobile and iPad by clicking the REFINE SEARCH button. The class name is new-search-results-filters. At the moment I have removed the tranlate3d ... because it wasn't working.

解决方案

Are you using any resize event to help you doing the position calculation? If yes, be aware that Safari has a identified bug that triggers the resize event randomly while doing scroll. This can mess up your position calculations.

这篇关于Safari绝对定位div滚动时消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆