使用 css(使用 chrome)禁用打印机默认页边距?

Disabling printer default margin with css (with chrome)?

使用 Adob​​e Indesign 可以得到这个结果:

我试图用 css

得到相同的结果
<style type="text/css" media="print">
@page 
{
    size: auto;   /* auto is the initial value */
    margin: 0mm;  /* this affects the margin in the printer settings */
}

body 
{
    background-color:#FFFFFF; 
    border: solid 1px black ;
    margin: 0px;  /* this affects the margin on the content before sending to   printer */
   }
</style>

但是边距设置为0是不可能的,我的4边一直都有边距:

我正在使用 google chrome 进行测试。我也试过:

同样的事情,4 个边上有一些小的白色边缘...怎么了?

如有任何帮助,我们将不胜感激。 JsFiddle : https://jsfiddle.net/L63dc1yd/

我想你可以用CSS3 Media Query解决这个问题。

@media print {
    html,body {
        margin: 0;
    }
}

我发现了问题。我在页面大小选择列表中没有看到 'US Letter bordeless' 选项。 css 没问题,它覆盖了 chrome 默认边距设置。