我怎么能有一个iframe,显示目标页面,并在50%的规模一切的元素呢?我怎么能有一个iframe,显示目标页面,并在50%的规模一切的元素呢?
我首先想到的是试图写一个css规模属性的框架,但我不知道,如果你可以写的CSS框架的内容。
谢谢!
我怎么能有一个iframe,显示目标页面,并在50%的规模一切的元素呢?我怎么能有一个iframe,显示目标页面,并在50%的规模一切的元素呢?
我首先想到的是试图写一个css规模属性的框架,但我不知道,如果你可以写的CSS框架的内容。
谢谢!
更容易转念一想......
<iframe id="frame"></iframe>
$('#frame').css
'-webkit-transform': 'scale(.5)'
'-moz-transform': 'scale(.5)'
'-o-transform': 'scale(.5)'
你忘了'-ms-transform'。现在不要诋毁微软,因为他们已经有了自己的行为。 – 2012-02-17 00:53:57
.............:| – fancy 2012-02-17 00:56:47
因为页面是在同一个域中,你也许能够把这个代码:
<script type="text/javascript">
if (location.href != top.location.href) {
// the page is loaded inside an iframe so
// Make everything 50% scale (I'm not sure what the code for that is in pure js)
// With jQuery:
$("*").css("zoom","50%");
}
</script>
在您加载在iframe页面的头部。
如果你不使用JQuery,此页面
http://pietschsoft.com/post/2006/06/01/Javascript-Loop-through-all-elements-in-a-form.aspx
具有通过表单中所有的元素没有像jQuery库如何循环的一个很好的例子。
是否在iframe指向同一个域作为父母,或另一个域? – 2012-02-16 17:35:30
同一域 – fancy 2012-02-16 17:39:47
可能'* {变焦:0.5; }'虽然我不确定'zoom'在标准或合规性方面如何。 (这也可能只是一个IE的事情) – 2012-02-16 17:42:15