html - 使flash成为html中的背景(全屏)

标签 html css flash

我制作了一个1920 * 1048的flash(16:9的屏幕),并将其嵌入到html中 喜欢:

<div style="top:0;left:0;background-color:red;width:100%;height:100%;z-index:-10">
<iframe height="100%" width="100%" src="./img/bg.swf" frameborder=0 allowfullscreen> </iframe>
</div>

问题是:

在 4:3 屏幕中,flash 的宽度为 100%,但顶部和底部有白色填充。看来闪光灯必须保持宽高比。

有什么办法可以让flash在4:3屏幕和16:9屏幕下全屏吗?

或者像css语法:

background:url(...) center center

图像总是全屏显示,而在 4:3 屏幕下只显示图像的一部分。

最佳答案

尝试使用 * { margin: 0;填充:0; } 这应该可以修复它。您也可以为 body

执行此操作

关于html - 使flash成为html中的背景(全屏),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24333146/

相关文章:

javascript - 如何将 dropEffect 光标定位为样式

javascript - 在 Jquery 中,如何使内容默认隐藏?

javascript - 在各种浏览器中使用 javascript 在客户端读取文件内容

html - 在绝对 div 上垂直对齐中间和文本对齐居中

jquery - 使用 jQuery 无法使用按键滚动页面?

jquery - 除非页面调整大小,否则隐藏滚动条

javascript - 设置 div 的高度但保持流畅

flash - 确定swf是否在 "debug"播放器或模式下

python - 如何在 flash 网页上运行 PyQt4?

javascript - 使用 Javascript 检测 Pepper (PPAPI) Flash