OLD | NEW |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 "http://www.w3.org/TR/html4/loose.dtd"> |
3 | 3 |
4 <html lang="en"> | 4 <html lang="en"> |
5 <head> | 5 <head> |
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
7 <title>Overflow Test</title> | 7 <title>Overflow Test</title> |
8 <style type="text/css" media="screen"> | 8 <style type="text/css" media="screen"> |
9 .container { | 9 .container { |
10 display: inline-block; | 10 display: inline-block; |
11 margin: 20px; | 11 margin: 20px; |
12 width: 100px; | 12 width: 100px; |
13 height: 100px; | 13 height: 100px; |
14 padding: 10px; | 14 padding: 10px; |
15 border: 1px solid black; | 15 border: 1px solid black; |
16 overflow: hidden; | 16 overflow: hidden; |
17 } | 17 } |
18 | 18 |
19 .box { | 19 .box { |
20 width: 100px; | 20 width: 100px; |
21 height: 300px; | 21 height: 300px; |
22 background-color: gray; | 22 background-color: gray; |
23 -webkit-transform: translateZ(0); | 23 transform: translateZ(0); |
24 } | 24 } |
25 </style> | 25 </style> |
26 </head> | 26 </head> |
27 <body> | 27 <body> |
28 <p>Gray box should be clipped by black border in each case.</p> | 28 <p>Gray box should be clipped by black border in each case.</p> |
29 <div class="container"> | 29 <div class="container"> |
30 <div class="box"> | 30 <div class="box"> |
31 </div> | 31 </div> |
32 </div> | 32 </div> |
33 | 33 |
34 <div class="container" style="position: relative"> | 34 <div class="container" style="position: relative"> |
35 <div class="box"> | 35 <div class="box"> |
36 </div> | 36 </div> |
37 </div> | 37 </div> |
38 | 38 |
39 <div class="container" style="position: relative; z-index: 0"> | 39 <div class="container" style="position: relative; z-index: 0"> |
40 <div class="box"> | 40 <div class="box"> |
41 </div> | 41 </div> |
42 </div> | 42 </div> |
43 | 43 |
44 </body> | 44 </body> |
45 </html> | 45 </html> |
OLD | NEW |