我有一个适用于 Chrome 的 NaCl 插件,我想用它填充整个窗口。 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;
}
关于html - 让 <object> 标签填满整个窗口并调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13040567/