最后打印页的页脚 [英] Footer on last printed page

查看:30
本文介绍了最后打印页的页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个客户想要打印的网页,我无法理解的部分是让页脚位于最后打印页面的底部,而不仅仅是在内容结束时

I have a web page that a client would like to print, and the part I'm having trouble getting my head around is to get the footer to sit at the bottom of the last printed page, not just when the content ends

我尝试过类似

 #printfooter{display: block; position:fixed; bottom: 0;}

但它在每页的末尾显示页脚.

but it displayed the footer at the end of each page.

也许我对 CSS 的要求有点高...它可行吗?

Maybe Im asking a bit too much from CSS... Is it doable?

我想我应该对<br/>'s (^_^)

I'm thinking I should just go crazy with <br />'s (^_^)

推荐答案

尝试将 body 相对定位,将footer 定位为绝对:

Try to position the body relative and the footer absolute:

body {
    position: relative;
}
#printfooter {
    position: absolute;
    bottom: 0;
}

使用 CSS 3 Paged Media 模块,您可以使用以下内容:

With CSS 3 Paged Media module you could use something like this:

@page:last {
    @bottom-center {
        content: "…";
    }
}

这篇关于最后打印页的页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆