【发布时间】:2017-06-27 12:12:08
【问题描述】:
在 iOS 上测试时,iframe 滚动不起作用。 Scroll 适用于 Android 设备。
【问题讨论】:
在 iOS 上测试时,iframe 滚动不起作用。 Scroll 适用于 Android 设备。
【问题讨论】:
我认为this 会帮助你。文章也有一个例子。
【讨论】:
$(function(){ if (/iPhone|iPod|iPad/.test(navigator.userAgent)) $('iframe').wrap(function(){ var $this = $(this); return $('<div />').css({ width: $this.attr('width'), height: $this.attr('height'), overflow: 'auto', '-webkit-overflow-scrolling': 'touch' }); }); }) - 喜欢这里jsfiddle.net/rq7yc4to/1