我将迪夫设置为media print
vh,但打印时它只是页面的一半.我try 添加media print
,但没有更改.我还try 将高度设置为media print
%.在HTML中有效,但在pdf上无效.
html,
body {
height: 100%;
margin: 0;
position: relative;
}
.page100vh {
background-color: red;
height: 1000vh;
width: 100vw;
}
@media print {
.page100vh {
height: 100vh;
}
}
<div class="page100vh"></div>