【问题标题】:css style print to top leftcss 样式打印到左上角
【发布时间】:2022-01-26 04:38:45
【问题描述】:

我需要把二维码移到左上角,知道怎么做吗?

现在,该输出的样式是:

        @media print {
        body * {
            visibility: hidden;
        }
        #printqr, #printqr * {
            visibility: visible;
        }
        #printqr {
            position: absolute;
            left: 0;
            top: 0;
        }
        }

【问题讨论】:

  • position: fixed 也许?

标签: javascript php html css


【解决方案1】:

希望能解决你的问题

#printqr {
  position: fixed;
  left: 0;
  top: 0; }

如果您需要更多详细信息,请阅读此内容:https://medium.com/@Idan_Co/the-ultimate-print-html-template-with-header-footer-568f415f6d2a

【讨论】:

    【解决方案2】:

    parentSelectorOf#printqr{
      position: relative;
    }
    #printqr {
      position: fixed;
      left: 0;
      top: 0; }

    【讨论】:

      猜你喜欢
      • 2011-10-28
      • 1970-01-01
      • 2012-05-11
      • 2011-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多