P粉8100506692023-09-02 00:21:21
Currently, Paged.js does not have a selector like :last
to select the last page.
Based on your question, I understand that you want to target the part of the last page that has content.
The named page approach you mentioned doesn't work because named pages rely on the class they are called from, and that class has to be added on an element or section that might be on a different page layout. You need to manually see how long the text is on the last page and put it into a div with a named page class for this to work.
@page :nth() pseudo-class.
Context: I tried setting up the rule using @page :nth(counter(pages)), but the counter only seems to work inside curly braces
. This causes paged.js to fail.