fixedpos-011-print.html (1117B)
1 <!DOCTYPE html> 2 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 3 <link rel="help" href="https://drafts.csswg.org/css-position-3/#valdef-position-fixed"> 4 <link rel="help" href="https://drafts.csswg.org/css-multicol/"> 5 <link rel="match" href="fixedpos-011-print-ref.html"> 6 <style> 7 body { 8 margin: 0; 9 } 10 :root { 11 print-color-adjust: exact; 12 } 13 .cover-me { 14 position: absolute; 15 z-index: -1; 16 right: 0; 17 width: 100px; 18 height: 100px; 19 background: red; 20 } 21 .text { 22 margin-right: 110px; 23 } 24 </style> 25 <div class="cover-me"></div> 26 <div style="position:fixed; right:0; top:0; columns:4; gap:0; column-fill:auto; width:100px; height:100px; background:red;"> 27 <div style="height:400px; background:green;"></div> 28 </div> 29 <div class="text"> 30 There should be three pages. All pages should have a green square in the top 31 right corner. 32 </div> 33 <div style="break-before:page;"> 34 <div class="cover-me"></div> 35 <div class="text">Second page</div> 36 </div> 37 <div style="break-before:page;"> 38 <div class="cover-me"></div> 39 <div class="text">Third page</div> 40 </div>