| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 body { | 3 body { |
| 4 height: 2000px; | 4 height: 2000px; |
| 5 width: 2000px; | 5 width: 2000px; |
| 6 overflow: hidden; | 6 overflow: hidden; |
| 7 } | 7 } |
| 8 | 8 |
| 9 .box { | 9 .box { |
| 10 height: 300px; | 10 height: 300px; |
| 11 width: 300px; | 11 width: 300px; |
| 12 margin: 20px; | 12 margin: 20px; |
| 13 margin-left: 10px; | 13 margin-left: 10px; |
| 14 background-image: url('../resources/alpha-blocks.png'); | 14 background-image: url('../resources/alpha-blocks.png'); |
| 15 | 15 |
| 16 background-size: 500px 300px; | 16 background-size: 500px 300px; |
| 17 background-repeat: no-repeat; | 17 background-repeat: no-repeat; |
| 18 background-attachment: fixed; | 18 background-attachment: fixed; |
| 19 box-shadow: 10px 10px 0px gray; /* inflates composited bounds */ | 19 box-shadow: 10px 10px 0px gray; /* inflates composited bounds */ |
| 20 border: 4px solid gray; | 20 border: 4px solid gray; |
| 21 float: left; | 21 float: left; |
| 22 } | 22 } |
| 23 | 23 |
| 24 .composited { | 24 .composited { |
| 25 -webkit-transform: translateZ(0); | 25 transform: translateZ(0); |
| 26 } | 26 } |
| 27 </style> | 27 </style> |
| 28 <script> | 28 <script> |
| 29 function doTest() | 29 function doTest() |
| 30 { | 30 { |
| 31 window.scrollTo(35, 45); | 31 window.scrollTo(35, 45); |
| 32 } | 32 } |
| 33 window.addEventListener('load', doTest, false); | 33 window.addEventListener('load', doTest, false); |
| 34 </script> | 34 </script> |
| 35 <div class="composited box"></div> | 35 <div class="composited box"></div> |
| 36 <div class="composited box"></div> | 36 <div class="composited box"></div> |
| OLD | NEW |