CSS3 GCPM spec定义了以下内容
.footnote { float: footnote }
A sentence consists of words. Most often..
呈现为
A sentence consists of words. ¹
¹ Most often. [at the end of (each) page]
当打印(也适用于屏幕媒体类型,但只要它适用于打印我很开心)。
这正是我想要做的,无论多么复杂,但据我所知,没有现代浏览器实现这个规范,也没有css-paging规范。如果我愿意使用javascript,是否有任何方法来达到这个效果。至少可以使用一些图书馆生成一个pdf,但如果可能,我不想失去html的力量(像浮点数等)。
为了防止你想知道,笔记是
A note is a string of text placed at the bottom of a page in a book or document or at the end of a chapter, volume or the whole text.
和脚注是
… notes at the foot of the page while endnotes are collected under a separate heading at the end of a chapter, volume, or entire work.
可以寻求解决方案的一个可能的方向是找出单页的高度,在这种情况下,在29.7cm的预期高度和26.1cm的试验与错误高度(至少在我的系统之间)之间会出现差异,这可以使用以下代码观察:
@page{
margin:0px;
padding:0px;
}
html,body,*{
margin:0px;
padding:0px;
}
p{
border:1px solid black;
height:26.1cm;
}
和一对空的< p>。我会考虑解释这种差异(从而允许它的控制)足够的解决方案。