我正在尝试使用 iframe
显示 pdf 的内容。在普通计算机上一切正常。然而,在苹果移动设备(iPhone/iPad)上,只显示 pdf 的第一页。
这是我的代码,我已经在其中添加了一些滚动样式,因为我认为这是与滚动相关的问题,但如果我将 iframe
设置得非常小,则可以滚动!但是问题仍然存在...只有第一页可见。
<div class="scroll-wrapper">
<iframe height="260" width="280" src="info.pdf"> </iframe>
</div>
.scroll-wrapper {
overflow-y:scroll;
-webkit-overflow-scrolling:touch;
width: 400px;
height: 300px;
}
最佳答案
也许您应该尝试使用视口(viewport)。 或者使用响应式断点
@media screen and (max-width:512px) {
size:
}
关于html - iframe 中的 pdf 仅在 iphone/ipad 的第一页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53558808/