我看了关于我的问题的每一个帮助仍然没有结果。我希望这个swf以网页为中心并调整大小,以便整个swf文件在视图中无论屏幕大小如何,我希望它处于固定位置,如bg。我试图实现我在本网站上看到的所有东西,几乎没有成功。这是我到目前为止的基础。如果您还需要其他任何信息,请告诉我。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CountdownFX</title>
</head>
<body style="background-color:black; background-attachment: fixed;">
<div id="DivCountdownFX" stye="position:absolute;">
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
var params = {};
params.base = "";
params.scale = "noscale";
params.salign = "tl";
params.wmode = "transparent";
params.allowFullScreen = "true";
params.allowScriptAccess = "always";
swfobject.embedSWF("CountdownFX.swf", "DivCountdownFX", "1268", "1269", "9.0.0", false, flashvars, params);
</script>
</div>
</body>
</html>
答案 0 :(得分:0)
首先,从position:absolute
的内联样式中删除#DivCountdownFX
。然后,创建以下类:
#DivCountdownFX {
margin:auto;
// If the div is fixed-width, use the following line:
width:[the width of your div];
// If your div is fluid width or part of a responsive layout, don't use the above, but rather,
text-align:center;
}