在Web应用程序iframe的变焦内容

问题描述 投票:1回答:1

我想显示的内容不被用于移动设备进行了优化。所以,我需要缩小内容出来。

这是一个Web应用程序,我不能使用JavaScript。

这是,我基本上用:

<div style="-webkit-overflow-scrolling: touch;overflow-x:hidden;overflow-y: auto;height:400px; margin: -1.2em;"> <iframe src="http://..." style="width:100%;height:390px;border: none;"></iframe></div>

对于变焦我发现:

-webkit-transform: scale(0.8);

所以我尝试:

<div style="-webkit-overflow-scrolling: touch;overflow-x:hidden;overflow-y: auto;height:400px; margin: -1.2em;-webkit-transform: scale(0.8);">
    <iframe src="http://..." style="width:100%;height:390px;border: none;"></iframe></div>

但结果却是,该IFRAME被放大了。请参阅:http://imgur.com/yueT0MB

你能帮助我吗?谢谢你,BR

html css iframe zoom
1个回答
1
投票

好吧,我解决了它

我用了

<div style="
    -webkit-overflow-scrolling: touch;
     overflow-x:hidden;
     overflow-y: auto;
     height:800px;
     width:850px;
     margin: -1.2em;">
     <iframe src="http://" style="
         width:800px;
         height:800px;
         -webkit-transform: scale(0.4);
         -webkit- transform-origin: 0 0;
         border: none;">
    </iframe>
</div>

如果IFRAME变小,我简单地增加它的大小。的200%= 100%50%

© www.soinside.com 2019 - 2024. All rights reserved.