| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 |
| 3 <html> |
| 4 <head> |
| 5 <style> |
| 6 body { |
| 7 margin: 0; |
| 8 width: 5000px; |
| 9 overflow: hidden; /* hide scrollbars */ |
| 10 } |
| 11 |
| 12 .container { |
| 13 position: absolute; |
| 14 width: 5000px; |
| 15 height: 180px; |
| 16 top: 100px; |
| 17 outline: 2px solid black; |
| 18 } |
| 19 |
| 20 .vertical_container { |
| 21 position: absolute; |
| 22 top: 0px; |
| 23 left: 100px; |
| 24 width: 180px; |
| 25 height: 5000px; |
| 26 outline: 2px solid black; |
| 27 } |
| 28 |
| 29 .box { |
| 30 width: 300px; |
| 31 height: 180px; |
| 32 } |
| 33 |
| 34 .vertical_box { |
| 35 width: 180px; |
| 36 height: 300px; |
| 37 } |
| 38 |
| 39 .sticky { |
| 40 position: sticky; |
| 41 right: 50px; |
| 42 background-color: green; |
| 43 } |
| 44 |
| 45 .vertical_sticky { |
| 46 position: sticky; |
| 47 bottom: 50px; |
| 48 background-color: blue; |
| 49 opacity: 0.75; |
| 50 } |
| 51 .space { |
| 52 width:2000px; |
| 53 height:100%; |
| 54 background-color: grey; |
| 55 opacity: 0.1; |
| 56 } |
| 57 .vertical_space { |
| 58 height:2000px; |
| 59 background-color: grey; |
| 60 opacity: 0.1; |
| 61 } |
| 62 .inline { |
| 63 display: inline-block; |
| 64 } |
| 65 </style> |
| 66 </head> |
| 67 <body> |
| 68 <div class="container"> |
| 69 <div class="space inline"></div> |
| 70 <div class="sticky box inline"></div> |
| 71 </div> |
| 72 <div class="vertical_container"> |
| 73 <div class="vertical_space"></div> |
| 74 <div class="vertical_sticky vertical_box"></div> |
| 75 </div> |
| 76 |
| 77 </body> |
| 78 </html> |
| 79 |
| OLD | NEW |