grid-layout-lines-shorthands.html (1113B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Grid Layout Test: grid lines shorthands</title> 5 <link rel="author" title="Leo Deng" href="mailto:myst.dg@gmail.com"> 6 <link rel="help" href="http://www.w3.org/TR/css-grid-1/#common-uses-named-lines"> 7 <link rel="match" href="../reference/grid-layout-basic-ref.html"> 8 <meta name="assert" content="the layout should behave the same as reference."> 9 <style> 10 body { 11 margin: 0; 12 padding: 0; 13 } 14 #caseTitle { 15 margin: 10px; 16 height: 40px; 17 } 18 #grid { 19 width: 150px; 20 background: #eee; 21 display: grid; 22 grid-template-columns: [left] 100px [center] 50px [right]; 23 } 24 .a { 25 background: blue; 26 grid-column: left / center; 27 } 28 .b { 29 background: yellow; 30 grid-column: center / right; 31 } 32 </style> 33 </head> 34 <body> 35 <p id="caseTitle">The test passes if it has the same visual effect as reference.</p> 36 <div id="grid"> 37 <div class="a"> </div> 38 <div class="b"> </div> 39 </div> 40 </body> 41 </html>