Safari 支持可滚动 iframe的方法:
在父容器添加 CSS3 属性 "-webkit-overflow-scrolling:touch"
<div style="overflow:auto;-webkit-overflow-scrolling:touch">
<iframe src="./content.html" style="width:100%;height:100%">
</div>
本文介绍了一种在Safari浏览器中实现可滚动iframe的方法,通过为父容器添加CSS3属性-webkit-overflow-scrolling:touch,解决了iframe在Safari中无法正常滚动的问题。
Safari 支持可滚动 iframe的方法:
在父容器添加 CSS3 属性 "-webkit-overflow-scrolling:touch"
<div style="overflow:auto;-webkit-overflow-scrolling:touch">
<iframe src="./content.html" style="width:100%;height:100%">
</div>
2538

被折叠的 条评论
为什么被折叠?