【发布时间】:2013-02-05 06:43:56
【问题描述】:
如何在<iframe> 和脚本中进行自动屏幕调整?它们包含指向外部网站的链接。
<iframe>代码:
<iframe id="tmc-ticker" src="http://themoneyconverter.com/AUD/RateTicker.aspx" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" height="30px" width="460px" style="float:left; margin:-1px 0px 0px 4px;"></iframe>
脚本:
<script>
var width='460';
var profile='CMSForexWebQuotes1-B';
</script>
<script id="vtCurrencyPairs" src="http://webcharts.fxserver.com/pairs/js/addActivePairs.js">/**/</script>
<div> <a href="http://www.cmsfx.com"></a> </div>
请看网站:http://hannahsclinic.com/salaamforex/
在放大/缩小尺寸变化时。
【问题讨论】:
-
为什么不对 iframe 使用宽度 100% 并使用父宽度来确定实际宽度?
-
我已经尝试了 100% 但它没有做出任何改变...我如何使用父宽度?
-
那是因为你的框架宽度固定为 460px。您需要将其更改为自动