如何防止空白区域出现在我的网页上方和下方?

时间:2016-03-27 17:26:15

标签: html whitespace dreamweaver muse

Please click this image for a detailed description of my issue

请参阅下面的HTML。我正在使用Google的Swiffy将我的ActionScript 3.0 SWF文件转换为HTML5。然后我使用iFrame将HTML5嵌入到我的网站中。



<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Swiffy Output</title>
  <script type="text/javascript" src="https://www.gstatic.com/swiffy/v7.4/runtime.js"></script>
  <script>
    swiffyobject = {
        "as3": true,
        "frameRate": 24,
        "frameCount": 109,
        "backgroundColor": -1,
        "frameSize": {
          "ymin": 0,
          "xmin": 0,
          "ymax": 14500,
          "xmax": 20000
        },
        "fileSize": 233905,
        "v": "7.4.1",
  </script>
  <style>
    html,
    body {
      width: 100%;
      height: 100%
    }
  </style>
</head>

<body style="margin-top: 0px; margin-bottom: 0px; overflow: hidden">
  <div id="swiffycontainer" style="width: 100%; height: 100%; margin-top: 0px; margin-bottom: 0px;">
  </div>
  <script>
    var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
      swiffyobject, {});

    stage.start();
  </script>
</body>

</html>
&#13;
&#13;
&#13;

           <iframe id="myiFrame" src="http://autogatesystems.businesscatalyst.com/phone/QS_Steel/QS_Steel.htm"
    style="border:0px;-webkit-overflow-scrolling: touch;overflow: hidden; fub;" name="myiFrame" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" height="604" width="100%"></iframe>

3 个答案:

答案 0 :(得分:0)

您是否尝试将html和body元素的margin-top和margin-bottom设置为0?

答案 1 :(得分:0)

将div的高度设置为100%

height: 100%;

答案 2 :(得分:0)

我解决了!我将我的html Google Swiffy机构的高度更改为:

    height: 60vw

在托管我的iFrame的HTML文件中,我将其更改为:

    height="60%"

白色空间从顶部和底部都消失了!