Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-break/abspos-002-print.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="match" href="abspos-002-print-ref.html">
<style>
@page {
size: 400px 200px;
margin: 0;
}
:root {
print-color-adjust: exact;
}
body {
margin: 0;
}
</style>
<div style="display:flow-root; height:200px;">
<p>There should be a green square on the second and third page, and no red.</p>
</div>
<div style="position:relative;">
<div style="height:350px;">
<div style="height:50px;"></div>
<div style="width:100px; height:100px; background:red;"></div>
<div style="height:50px;"></div>
<div style="width:100px; height:100px; background:red;"></div>
</div>
<div style="position:absolute; top:50px;">
<div style="contain:size; width:100px; height:100px; background:green;"></div>
<div style="contain:size; width:100px; height:100px; background:green;"></div>
</div>
</div>