在h5网页中,嵌套第三方页面,使用iframe,然后根据第三方内容,等比例缩小,填充iframe。主要解决h5iOSapp,在线查看文件的问题。思路:将iframe宽高设置200%,然后缩小0.5
#iframeA {
position: absolute;
transform: scale(.5, .5) translate(-50%, -50%);
width: 200%;
height: 200%;
top: 0;
left: 0
}
<div style="height:100%;overflow-y:scroll;overflow-x:hidden">
<iframe id="iframeA" src="images/boy.png" frameborder="0" scrolling="no">
</iframe>
</div>