| OLD | NEW |
| 1 <!DOCTYPE> | 1 <!DOCTYPE> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Opacity and positioning</title> | 4 <title>Opacity and positioning</title> |
| 5 <style type="text/css" media="screen"> | 5 <style type="text/css" media="screen"> |
| 6 .container { | 6 .container { |
| 7 position: relative; | 7 position: relative; |
| 8 height: 120px; | 8 height: 120px; |
| 9 width: 120px; | 9 width: 120px; |
| 10 padding: 10px; | 10 padding: 10px; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 .inner { | 23 .inner { |
| 24 position: absolute; | 24 position: absolute; |
| 25 width: 100px; | 25 width: 100px; |
| 26 height: 100px; | 26 height: 100px; |
| 27 background-color: green; | 27 background-color: green; |
| 28 } | 28 } |
| 29 | 29 |
| 30 .compositing { | 30 .compositing { |
| 31 -webkit-transform: translateZ(0); | 31 transform: translateZ(0); |
| 32 } | 32 } |
| 33 </style> | 33 </style> |
| 34 </head> | 34 </head> |
| 35 <body> | 35 <body> |
| 36 <p>You should see two green boxes below, with no red</p> | 36 <p>You should see two green boxes below, with no red</p> |
| 37 | 37 |
| 38 <div class="container"> | 38 <div class="container"> |
| 39 <div class="child"> | 39 <div class="child"> |
| 40 <div class="inner"></div> | 40 <div class="inner"></div> |
| 41 </div> | 41 </div> |
| 42 </div> | 42 </div> |
| 43 | 43 |
| 44 <div class="container"> | 44 <div class="container"> |
| 45 <div class="child"> | 45 <div class="child"> |
| 46 <div class="inner compositing"></div> | 46 <div class="inner compositing"></div> |
| 47 </div> | 47 </div> |
| 48 </div> | 48 </div> |
| 49 | 49 |
| 50 </body> | 50 </body> |
| 51 </html> | 51 </html> |
| OLD | NEW |