【发布时间】:2017-06-27 10:35:06
【问题描述】:
我需要知道是否可以使用:last 选择器修改最后一页的内容。
我不确定它是否存在,我看到它在其他 stackoverflow 答案中使用,如下所示:Footer on last printed page。 但我在documentation 中找不到它,我尝试使用它时它不起作用。
我正在尝试清除上一页页脚的内容,如下所示:
@page {
@bottom-right {
content: "Please turn over";
}
}
@page :last {
@bottom-right {
content: none;
}
}
当我将它与:firstselector 一起使用时,它可以工作。怎样才能得到最后一页的效果?
我正在使用 Weasyprint 打印 PDF 文件。
【问题讨论】:
-
这似乎很奇怪,他们做了一个
left、right、first,却没有last。
标签: css css-paged-media