我有一个用于显示文本和pdf文件的iframe。它的工作完美在铬,即和mozilla。但我尝试在ipad中加载相同的safari。 pdf不能滚动。附加代码相同。
.docviewer-wrapper{
-webkit-overflow-scrolling: touch;
overflow-y: scroll;
}
iframe {
height: 100%;
width: 100%;
}
<div class="container docviewer-wrapper">
<iframe id="docvieweriframe" src="http://www.pdf995.com/samples/pdf.pdf"></iframe>
</div>
请帮我。
iframe
,object
,embed
在iOS设备上存在一些问题,这些问题在平台数量上有所报道。您所能做的就是使用iframe的第三方替代方案。我用PDF.js解决了我的问题
如果您正在尝试使用rails this article将帮助您在rails应用程序中集成pdf.js。
尝试为docviewer-wrapper类提供高度和宽度