我有一个弹出窗口,它的背景不占全高我知道它是由 position:fixed
完成的以占全高,但我想采用它 position:absolute
在移动 View 中,并完全覆盖屏幕,但它不采取 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>
关于javascript - 弹出背景不占据屏幕高度的完整高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31724278/