使<object>标记填充整个窗口并用它调整大小

我有一个Chrome插件,我想填写整个窗口。 HTML是这样的:

<!DOCTYPE html>
<html>
  <head></head>
  <body>
    <div class="container,box">
      <object class="internal,box"></object>
    </div>
  </body>
</html>

我尝试了几种风格:

  •     html {
          height: 100%;
        }
        .box {
          position:absolute;
          left/right/top/bottom: 0;
          display:block;
          padding: 5px
        }

    填满整个窗口,保持默认大小,300x150。

  •     html, body, .box { padding: 0; border: 0; margin: 0; width: 100%; height: 100% }
        .container { padding: 5px; } 

    填充整个窗口,但宽度/高度不受填充影响,因此它溢出了容器

  • 有没有人遇到类似的问题? 任何CSS解决方案? 我只需要它在Chrome中工作。


    .internal {
        width: 100%;
        height: 100%;
    }
    
    .container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
     }
    
    链接地址: http://www.djcxy.com/p/75523.html

    上一篇: Make <object> tag fill the whole window and resize with it

    下一篇: Input at 100% width overlaps div