grid-gap-larger-002-ref.html (755B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html><head> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: subgrid with larger gap than parent grid</title> 9 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 10 <style> 11 html,body { 12 color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0; 13 } 14 15 .grid { 16 display:inline-grid; 17 grid:100px auto/100px; 18 gap:20px; 19 border:3px solid; 20 background:yellow; 21 } 22 span { background:lightgrey; } 23 span:nth-child(2n+1) { background:grey; } 24 </style> 25 </head> 26 <body> 27 28 <div class="grid"> 29 <span style="height:60px">a</span><span style="margin-top:40px">b</span> 30 </div> 31 32 </body> 33 </html>