multi-line-row-flex-fragmentation-063-print.html (1148B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="utf-8"> 4 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 5 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 6 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination"> 7 <link rel="match" href="multi-line-row-flex-fragmentation-063-print-ref.html"> 8 9 <style> 10 @page { size: 5in 3in; margin: 0.5in; } 11 :root { 12 print-color-adjust: exact; 13 } 14 body { margin: 0; } 15 16 .flexbox { 17 display: flex; 18 flex-wrap: wrap; 19 border: 0.25in solid black; 20 font-size: 0.25in; 21 row-gap: 0.2in; 22 } 23 .item { 24 contain: size; 25 box-sizing: border-box; 26 border: 4px solid purple; 27 height: 0.5in; 28 flex: 0 0 100%; 29 } 30 </style> 31 32 <!-- This div makes the flexbox not at the top of first page. --> 33 <div style="height: 0.25in; background: gray;"></div> 34 35 <div class="flexbox"> 36 <div class="item">1</div> 37 <div class="item">2</div> 38 <div class="item">3</div> 39 <div class="item">4</div> 40 <div class="item">5</div> 41 <div class="item">6</div> 42 </div> 43 44 <div style="height: 0.25in; background: gray;"></div> 45 </html>