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