【问题标题】:Display footer on every html print page [duplicate]在每个 html 打印页面上显示页脚 [重复]
【发布时间】:2015-03-11 02:13:21
【问题描述】:

我想在所有打印页面上显示我的页脚,但它只在最后一页显示,对我没有任何作用。如果有人有想法。

我搜索了许多 CSS 建议,但对我没有任何帮助。我的技术仅在最后一页显示页脚。但我需要在所有可打印的页面上显示。

<style type="text/css">
html, body {
    height: 98.5%;
    width: 98%;
}
.wrapper {
    min-height: 98.5%;
    width: 98%;
    height: auto !important;
    height: 98.5%;
    margin: 0.3in 0.5in -0.1in 0.5in;
}
.footer, .push {
    margin-bottom: 0px;
    height: 10px;
    text-align: center;
}
.attachment-watermark-print {
    font-size: 20px;
    font-weight: bold;
    opacity: .5;
}
</style>

<div class="wrapper">
    <div id="content"></div>
    <div class="push" style="clear: both;"></div>
</div>
<div class="footer">
<span id="spnWaterMark" class="attachment-watermark-print">
Printed from My System
</span>
</div>

【问题讨论】:

    标签: jquery html css


    【解决方案1】:

    在你的 CSS 中使用它,

    .attachment-watermark-print {
    position:absolute;
    bottom:0;
    font-size: 20px;
    font-weight: bold;
    opacity: .5;
    }
    

    并在.footer 类中添加这些附加属性,

    .footer {
      position:relative;
    }
    

    【讨论】:

    • 谢谢,但这种方法对我仍然不起作用,它只在打印模式下显示最后一页的水印。
    • 上面的 CSS 不是我在谷歌浏览器中的问题...请问有什么解决方案 chrome..securedeveloper
    猜你喜欢
    • 2017-10-11
    • 1970-01-01
    • 2018-12-04
    • 1970-01-01
    • 1970-01-01
    • 2017-09-05
    • 2012-12-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多