我不确定这是否可能,但我的iframe设置为相对。我的问题是如何设置默认图像来自动调整大小的iframe的大小?该代码...使Iframe默认图片的大小与空白iframe相同
<iframe name="iframe1"src="../Pictures/coolcenturylink.jpg" height="%"width="%"/></iframe>
iframe
{
position:relative;
float:right;
height:80%;
width:84.5%;
top:%;
background-color:;
}
编辑下面点......
<img src="coolcenturylink.jpg"/>
.coolcenturylink.jpg
{
max-width: 100%;
}
<iframe name="iframe1"src="../Pictures/coolcenturylink.html"></iframe>
http://codecopy.wordpress.com/2013/02/22/ghost-iframe-crossdomain-iframe-resize/ – 2013-04-24 01:58:44