0

我查看了有关我的问题的所有帮助,但仍然没有结果。我想让这个 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>
4

1 回答 1

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;
}
于 2013-01-27T06:47:59.153 回答