在 Android 上,使用域外的任何https iframe src 会导致 iframe 不滚动:
<div style="-webkit-overflow-scrolling:touch;
height:300px;width:300px;overflow:auto;">
<iframe height="100%" src="https://fully-qualified-domain/"></iframe>
</div>
有没有办法让 iframe 根据其内容自然扩展?
到目前为止,我发现的唯一解决方案是在 iframe 上设置一个似乎适合内容的最小高度。如果太大,那么iframe会滚动很长时间,使用起来有点麻烦,但至少可以看到iframe页面。
<div style="-webkit-overflow-scrolling:touch;
height:300px;width:300px;overflow:auto;">
<iframe style="min-height:1000px;" height="100%" src="https://fully-qualified-domain/"></iframe>
</div>