2009-07-24 56 views
9

我有一个客户想要打印的网页,而我无法控制头部的部分是让页脚坐在最后一个打印页面的底部,而不是只是当内容结束最后一次打印页面上的页脚

我想是这样

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

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

也许我从CSS问得太多了......它可行吗?

我想我应该去疯狂< BR />的(^_^)

+0

我使用相同的CSS,但该CSS只能在Firefox上工作。你有同样的问题吗? – printf 2013-06-27 09:29:34

回答

4

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

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

随着CSS 3 Paged Media module你可以使用这样的事情:

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

是啊! ......但是......第一个对于一个页面有好处,但对两个不好...... CSS3可能不会在客户端的客户端的broswers上支持(就像CSS3一样酷)。谢谢,但! – Assembler 2009-07-27 07:41:56