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

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

问题描述

我有一个客户想要打印的网页,而我遇到的问题是让页脚位于最后打印页面的底部,而不仅仅是当内容结束时



我尝试过像

  #printfooter {display:block;位置:固定; bottom:0;} 

但是它在每一页的末尾显示页脚。

也许我从CSS中要求太多了...它是否可行?



我想我应该去疯狂与< br />(^ _ ^)

解决方案

尝试定位身体相对和页脚绝对:

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

使用 CSS 3分页媒体模块,您可以使用这样的:

  @page:last {
@ bottom-center {
content:...;
}
}


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

I tried something like

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

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

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

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

解决方案

Try to position the body relative and the footer absolute:

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

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

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

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

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