简体   繁体   English

块在打印页面的底部 html css

[英]block at the bottom of a printed page html css

I have this page in JSFile : My test case我在 JSFile 中有这个页面:我的测试用例

.qr-bill {
    box-sizing: border-box;
    width: 210mm;
    height: 105mm;
    font-family: Arial, Frutiger, Helvetica, "Liberation Sans";
    border-collapse: collapse;
    color: #000;
    page-break-after: always;
    page-break-inside: avoid;
}

When I print my page, I would like to have any of div bloc .qr-bill that need to showed at the bottom of the current page... I can't success to do it with position... Do you have any idea how to do that ?当我打印我的页面时,我希望有任何需要显示在当前页面底部的 div bloc .qr-bill ......我无法成功使用位置......你有吗?想法如何做到这一点?

Thank you谢谢

Give it a position of fixed and bottom of 0 for it to appear at the bottom of every page that is printed.给它一个fixed的位置和0底部,让它出现在打印的每一页的底部。 If you want the page to look different when printed, provide a media query like this:如果您希望页面在打印时看起来不同,请提供如下媒体查询:

@media print {
  .qr-bill {
    position: fixed;
    bottom: 0;
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM