我正在我的网站上显示一个远程网页,如下所示:
<iframe src="http://www.smopething.com/index.cfm"
frameborder="0"
width="800"
scrolling="no"
height="1100">
</iframe>
我可以自定义它的大小吗?类似 <iframe src="etc", height=something,width=something>
???
最佳答案
如果愿意,您可以使用 CSS:
<iframe src="http://google.com" style="width:640px;height:480px;"></iframe>
或者您可以使用宽度和高度属性:
<iframe src="http://google.com" width="640" height="480"></iframe>
关于javascript - 自定义网页内 iframe 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2163643/