我有一个弹出窗口它的背景没有完全显示出来我知道position:fixed
是完全显示出来的但是我想让position:absolute
在移动视图中完全覆盖屏幕但它不像height:100%
或height:auto
只显示1/2屏幕背景而不是完全100%
我猜你是在寻找这样的东西:
.popup {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: tomato;
}
<div class="popup">I cover the whole screen!</div>
var windowObjectReference = window.open(strUrl, strWindowName, [strWindowFeatures]);
window.open(fullscreen=Yes);
,
记得在css中设置
html, body {
height:100%;
}
否则,任何内容元素中的height:100%
都不会覆盖整个屏幕,而是会受到限制,这个默认情况下不展开