grid-abspos-items-007.html (1682B)
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: abs pos areas</title> 9 <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1204585"> 10 <link rel="help" href="http://dev.w3.org/csswg/css-grid/#abspos-items"> 11 <link rel="match" href="grid-abspos-items-007-ref.html"> 12 <style type="text/css"> 13 html,body { 14 color:black; background-color:white; font-size:16px; padding:0; margin:0; 15 } 16 separator { clear:both; display:block; height:6px; } 17 18 .grid { 19 display: grid; 20 float: left; 21 position: relative; 22 border-style: solid; 23 border-width: 1px 3px 5px 7px; 24 border-block-start-color: blue; 25 border-inline-start-color: lime; 26 grid-template: 13px 23px 7px / 11px 31px 13px; 27 margin-right: 4px; 28 } 29 30 abs1 { 31 position: absolute; 32 top:0;left:0;bottom:0;right:0; 33 background: grey; 34 } 35 36 .hl { writing-mode: horizontal-tb; direction:ltr; } 37 .hr { writing-mode: horizontal-tb; direction:rtl; } 38 .vl { writing-mode: vertical-lr; } 39 .vr { writing-mode: vertical-rl; } 40 .vlr { writing-mode: vertical-lr; direction:rtl; } 41 .vrl { writing-mode: vertical-rl; direction:ltr; } 42 43 </style> 44 </head> 45 <body> 46 47 <script> 48 var wm = [ "hl", "hr", "vl", "vr", "vlr", "vrl" ]; 49 for (var i = 0; i < wm.length; ++i) { 50 for (var j = 0; j < wm.length; ++j) { 51 var div = document.createElement("div"); 52 div.className = "grid " + wm[i]; 53 div.appendChild(document.createElement("abs1")); 54 document.body.appendChild(div) 55 } 56 document.body.appendChild(document.createElement("separator")); 57 } 58 </script> 59 60 61 </body> 62 </html>