如何扩展iframe的内容? [英] How can I scale the content of an iframe?
本文介绍了如何扩展iframe的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在网站的网页中扩展iframe的内容(在我的示例中是HTML页面,而不是弹出式窗口)?
How can I scale the content of an iframe (in my example it is an HTML page, and is not a popup) in a page of my web site?
例如,我要显示出现在iframe中的内容大小为原始大小的80%。
For example, I want to display the content that appears in the iframe at 80% of the original size.
推荐答案
Kip的解决方案应适用于Opera和Safari,如果您将CSS更改为:
Kip's solution should work on Opera and Safari if you change the CSS to:
<style>
#wrap { width: 600px; height: 390px; padding: 0; overflow: hidden; }
#frame { width: 800px; height: 520px; border: 1px solid black; }
#frame {
-ms-zoom: 0.75;
-moz-transform: scale(0.75);
-moz-transform-origin: 0 0;
-o-transform: scale(0.75);
-o-transform-origin: 0 0;
-webkit-transform: scale(0.75);
-webkit-transform-origin: 0 0;
}
</style>
您可能还想在#frame上指定overflow:hidden以防止滚动。
You might also want to specify overflow: hidden on #frame to prevent scrollbars.
这篇关于如何扩展iframe的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文