演示:
print()
@page { size: A4 landscape; margin: 0; } html,body { margin: 0; } html { background: cyan; } body { width: 297mm; height: 210mm; background: red; }
A4横向的尺寸正确,但打印溢出到第二页.这些发生在Win 10 Chrome 63,FF 52和Edge 41中.
When I use the portrait dimensions and print A4 Portrait,then only one page is printed as expected,without any overflow.
有没有人有这个问题的线索?它是否出现在每个平台上?
先感谢您
解决方法
used
body {margin-top: -1px }
print()
@page { size: A4 landscape; margin: 0; } html,body { margin: 0; } html { background: cyan; } body { width: 297mm; height: 210mm; background: red; margin-top: -1px; }