zoukankan      html  css  js  c++  java
  • js打印去掉页眉页脚

        <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 0px black ;
                margin: 50px;  /* this affects the margin on the content before sending to printer */
            }
        </style>
    

      head中加入以上代码,主流浏览器均可以实现。

      参考http://stackoverflow.com/questions/1960939/disabling-browser-print-options-headers-footers-margins-from-page

  • 相关阅读:
    8.26 树状数组
    8.27 神异之旅
    8.26 雇佣
    8.28 Jack与Rose
    8.28 ISN
    保存和加载网络
    快速搭建网络
    分类网络
    torch中的回归
    pytorch中的Variable
  • 原文地址:https://www.cnblogs.com/KyleLi/p/9558439.html
Copyright © 2011-2022 走看看