我使用Swfobject在我的网站上嵌入了一个Flash游戏,我定义了维度,但游戏适合容器。我如何定义宽度(和高度)也作为最大宽度?
<!-- Game embedding -->
<script type="text/javascript">
var attributes = {id: "gm", name: "Rebuild Chile"};
swfobject.embedSWF("game.swf", "gm", "720", "480", "9.0", null, attributes);
</script>
<div id="gm"></div>
<!-- Game embedding -->
什么是错误的?
答案 0 :(得分:0)
我这样解决了:
<!-- Game embedding -->
<script type="text/javascript">
var attributes = {id: "gm", name: "Game name"};
swfobject.embedSWF("game.swf", "gm", "720", "480", "9.0", null, attributes);
</script>
<div id="gm_container">
<div id="gm" style="height:480; witdh=:720;">
</div>
</div>
<!-- Game embedding -->