底部60左右的像素被切断,css不正确?

时间:2014-05-02 05:46:41

标签: javascript html css html5 css3

我正在使用以下代码,但出于某种原因,我遇到了部分页面被切断的问题,这意味着暂停/播放/静音和全屏幕无法在我的Flash对象上运行。

CSS我做错了什么?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>2014-05-02_0203.swf</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <style>
            #header_container {
                background: url(../swf/table-images/gradhead.png) repeat-x #000;
                border: 0 solid #666;
                height: 80px;
                left: 0;
                position: fixed;
                top: 0;
                width: 100%;
            }
            #header {
                color: #ECECEC;
                height: 80px;
                margin: 0 auto;
                position: relative;
                text-align: center;
                width: 100%;
            }
            #container {
                margin: 0 auto;
                padding: 80px 0;
                width: 100%;
            }
        </style>
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
            var width = window.innerWidth ||
                document.documentElement.clientWidth ||
                document.body.clientWidth;
            var height = window.innerHeight ||
                document.documentElement.clientHeight ||
                document.body.clientHeight;
        </script>
        <script type="text/javascript">
            var flashvars = {};
            var params = {allowfullscreen: "true", menu: "false"};
            var attributes = {};
            swfobject.embedSWF("2014-05-02_0203.swf", "myContent", width, height-90, "9.0.0", "2014-05-02_0203.swf", flashvars, params, attributes);
        </script>
    </head>
    <body bgcolor="#FFF">
        <div id="container">
            <div id="header_container">
                <div id="header"><div class="headimage">
                    <a href="http://example.com/" target="_blank">
                    <img alt="" class="headimager" src="http://placehold.it/350x95"/></a>
                </div>
            </div>
            <div id="myContent">
                <h1>Alternative content</h1>
                <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
        </div>
    </div>
    </body>
</html>

ralph.m的新CSS见:

<style>
    #header_container {
        background: url(..//table-images/gradhead.png) repeat-x #0E4216;
        height: 80px;
        left: 0;
        top: 0;
    }
    #header {
        height: 80px;
        text-align: center;
    }
</style>

1 个答案:

答案 0 :(得分:0)

你的内容本身不会扩展身体(也许是因为flash播放器使用了一些特殊的古怪css)所以,你可以手动改变它:

html, body {
    height: 100%;
    width:100%;
}

所以,我不知道你做错了什么,但也许这会对你有所帮助 (我曾经遇到同样的问题,从来没有得到它为什么......)