padding-scrollbar-placement-ref.html (1289B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 5 <title>Padding and Scrollbar Placement Test Reference</title> 6 <style>input, textarea { border-radius:0; background:none; border:none; }</style> 7 <style type="text/css"> 8 #t { 9 display: block; 10 position: absolute; 11 left: 50px; 12 top: 50px; 13 padding: 50px; 14 width: 300px; 15 height: 100px; 16 border: 5px solid red; 17 margin: 10px; 18 overflow: scroll; 19 font-family: verdana; 20 white-space: pre-wrap; 21 z-index: 0; /* force a stacking context */ 22 } 23 #cover { 24 position: absolute; 25 left: 400px; 26 top: 50px; 27 width: 100px; 28 height: 300px; 29 background: black; 30 } 31 </style> 32 </head> 33 <body> 34 <script> 35 var ss = []; 36 for (var i = 0; i < 1000; ++i) { 37 ss.push(i); 38 } 39 document.write("<div id='t'>" + ss.join(" ") + "</div>"); 40 </script> 41 <div id="cover"></div> 42 </body> 43 </html>