Last active
February 27, 2020 17:54
-
-
Save faceless2/56fbb0227d9de50f72af8f42bb35b1e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<style> | |
:root { | |
counter-reset: page 0 b 0 e 0; | |
} | |
@page { | |
counter-increment: page 1 b 1; | |
margin: 36px; | |
@top-center { | |
content: counter(page); | |
} | |
} | |
div { | |
break-before: page; | |
counter-increment: e 1; | |
} | |
#div1 { | |
string-set: c counter(page), d counter(b), f counter(e); | |
} | |
</style> | |
</head> | |
<body> | |
<div id="div1">div1</div> | |
<div id="div2">Div2</div> | |
<div id="div3">Div3</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment