Multi-page print test
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> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Multi-page print test</title> | |
<!-- | |
Print to PDF, landscape, letter size, no margins, enable background graphics. | |
Tested on Chrome. | |
--> | |
<style> | |
html, | |
body { | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
.page { | |
page-break-inside: avoid; | |
break-inside: avoid; | |
page-break-before: always; | |
break-before: page; | |
background-image: radial-gradient( | |
circle at 50% 50%, | |
#00c 0%, | |
#002 100% | |
); | |
color: white; | |
padding: 1em; | |
height: 95%; | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
} | |
.page:first-child { | |
page-break-before: avoid; | |
break-before: avoid; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="page"> | |
<h1>Slide 1</h1> | |
<p>Slide text.</p> | |
</div> | |
<div class="page"> | |
<h1>Slide 2</h1> | |
<p>Slide text.</p> | |
</div> | |
<div class="page"> | |
<h1>Slide 3</h1> | |
<p>Slide text.</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment