Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script> | |
| 3 if (window.internals) { | |
| 4 internals.settings.setCSSStickyPositionEnabled(true); | |
| 5 } | |
| 6 </script> | |
| 7 | |
| 8 <html> | |
| 9 <head> | |
| 10 <style> | |
| 11 body { | |
| 12 margin: 0; | |
| 13 width: 5000px; | |
| 14 overflow: hidden; /* hide scrollbars */ | |
| 15 } | |
| 16 | |
| 17 .container { | |
| 18 position: absolute; | |
| 19 width: 5000px; | |
| 20 height: 180px; | |
| 21 top: 100px; | |
| 22 outline: 2px solid black; | |
| 23 } | |
| 24 | |
| 25 .vertical.container { | |
| 26 top: 0px; | |
| 27 left: 100px; | |
| 28 width: 180px; | |
| 29 height: 5000px; | |
| 30 } | |
| 31 | |
| 32 .box { | |
| 33 width: 300px; | |
| 34 height: 180px; | |
| 35 } | |
| 36 | |
| 37 .vertical .box { | |
| 38 width: 180px; | |
| 39 height: 300px; | |
| 40 } | |
| 41 | |
| 42 .sticky { | |
| 43 position: sticky; | |
| 44 left: 50px; | |
| 45 right: 50px; | |
|
flackr
2017/04/03 20:45:17
Instead of calling these tests sticky-both-sides-#
wanchang
2017/04/04 00:57:48
Done.
| |
| 46 background-color: green; | |
| 47 } | |
| 48 | |
| 49 .vertical .sticky { | |
| 50 left: 0; | |
|
flackr
2017/04/03 20:45:17
Seems like the left shouldn't affect the vertical
wanchang
2017/04/04 00:57:48
Done.
| |
| 51 top: 50px; | |
| 52 bottom: 50px; | |
| 53 background-color: blue; | |
| 54 opacity: 0.75; | |
| 55 } | |
| 56 .space { | |
| 57 width:2000px; | |
| 58 height:100%; | |
| 59 background-color: grey; | |
| 60 opacity: 0.1; | |
| 61 } | |
| 62 .vertical .space { | |
| 63 height:2000px; | |
| 64 background-color: grey; | |
| 65 opacity: 0.1; | |
| 66 } | |
| 67 .inline { | |
| 68 display: inline-block; | |
| 69 } | |
| 70 </style> | |
| 71 </head> | |
| 72 <body> | |
| 73 <div class="container"> | |
| 74 <div class="space inline"></div> | |
| 75 <div class="sticky box inline"></div> | |
| 76 </div> | |
| 77 <div class="vertical container"> | |
| 78 <div class="vertical space"></div> | |
|
flackr
2017/04/03 20:45:17
the vertical class here (and in several of the oth
wanchang
2017/04/04 00:57:48
You are right. It was not what I wanted. I changed
| |
| 79 <div class="sticky box"></div> | |
| 80 </div> | |
| 81 | |
| 82 </body> | |
| 83 </html> | |
| 84 | |
| OLD | NEW |