在所有浏览器(Chrome)上从网站,每个打印页面打印页脚 [英] Print footer on every printed page from website, across all browsers (Chrome)
本文介绍了在所有浏览器(Chrome)上从网站,每个打印页面打印页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
很抱歉,我尝试CSS位置:固定属性,但它在Firefox和IE(黑客IE6)上正常工作,但它不工作在所有的Chrome。我认为Chrome是最新的将支持它很容易,但仍然不是。我尝试了< thead>,< tfoot>< tbody>再次在IE和Firefox中工作,但在Chrome中有问题。请任何人有其他解决方案。
Dear all, I tried CSS Position: Fixed Property but it does work properly on Firefox and IE(hack for IE6), but it's not working at all for Chrome. I thought Chrome being the latest will support it very easily but still it isn't. I Tried out <thead>,<tfoot><tbody> again works in IE and Firefox, but problematic in Chrome. Please any one have an alternate solution to it.
推荐答案
这是我使用的代码。注意我将html和body高度都设置为100%。
This is the code i use. Note I am setting both html and body height to 100%.
@media print {
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#footer {
position: absolute;
bottom: 0;
}
}
这篇关于在所有浏览器(Chrome)上从网站,每个打印页面打印页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文