检测 css 位置溢出是否有效?
由于iOS5 beta已经修复了css属性overflow:scroll和overflow:auto,我想用Javascript来定位旧的iOS版本。
有没有办法通过 JS 检查该属性是否确实有效?尝试获取样式属性确实会在两个 Mobile Safari 中提醒正确的值,但在当前版本中,它需要两根手指滚动才能工作。
As iOS5 beta has fixed css property overflow: scroll and overflow: auto, I’d like to target the older iOS versions with Javascript.
Is there a way to check with JS if the property is actually working or not? Trying to get the style property does alert the correct value in both Mobile Safaris, but in the current version it requires a two-finger scrolling to work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道如何检查滚动属性是否正常工作,但您可以检查
user-agent
来确定他们正在运行的 iOS 版本(以下示例中的 3.2):I don't know of a way to check if the scroll property is working but you could check the
user-agent
to determine which version of iOS they're running (3.2 in the following example):