| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script> | 2 <style type="text/css"> |
| 3 if (window.internals) { | 3 div { |
| 4 internals.settings.setCSSStickyPositionEnabled(true); | 4 height: 100px; |
| 5 } | 5 width: 100px; |
| 6 </script> | 6 } |
| 7 | 7 .sticky { |
| 8 <html> | 8 background-color: green; |
| 9 <head> | 9 position: relative; |
| 10 <style> | 10 } |
| 11 body { | 11 .red { |
| 12 margin: 0; | 12 background-color: red; |
| 13 } | 13 margin-top: -100px; |
| 14 | 14 } |
| 15 .container { | |
| 16 width: 200px; | |
| 17 height: 400px; | |
| 18 outline: 2px solid black; | |
| 19 } | |
| 20 | |
| 21 .box { | |
| 22 width: 200px; | |
| 23 height: 200px; | |
| 24 } | |
| 25 | |
| 26 .sticky { | |
| 27 position: sticky; | |
| 28 } | |
| 29 | |
| 30 .child { | |
| 31 position: relative; | |
| 32 background-color: green; | |
| 33 z-index: 2; | |
| 34 } | |
| 35 </style> | 15 </style> |
| 36 </head> | 16 <!-- |
| 37 <body> | 17 Tests that the sticky node will be popped out into a stacking context on top of
the node which follows it. You should |
| 38 <div class="group"> | 18 see no red boxes as the green sticky div should pop on top of the red div placed
under it. |
| 39 <div class="container"> | 19 --> |
| 40 <div class="sticky box"> | 20 <div class="sticky"></div> |
| 41 <div class="child box"></div> | 21 <div class="red"></div> |
| 42 </div> | |
| 43 </div> | |
| 44 </div> | |
| 45 | |
| 46 </body> | |
| 47 </html> | |
| OLD | NEW |