OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 | |
3 <html> | |
4 <head> | |
5 <style> | |
6 body { | |
7 margin: 0; | |
8 overflow: hidden; /* hide scrollbars */ | |
9 } | |
10 | |
11 .group { | |
12 display: inline-block; | |
13 position: relative; | |
14 width: 250px; | |
15 height: 500px; | |
16 } | |
17 | |
18 .container { | |
19 -webkit-writing-mode: horizontal-bt; | |
20 width: 200px; | |
21 height: 400px; | |
22 border: 10px solid black; | |
23 padding: 5px; | |
24 } | |
25 | |
26 .box { | |
27 width: 200px; | |
28 height: 200px; | |
29 } | |
30 | |
31 .sticky { | |
32 position: relative; | |
33 background-color: green; | |
34 } | |
35 </style> | |
36 </head> | |
37 <body> | |
38 <div class="group" style="top: -100px"> | |
39 <div class="container"> | |
40 <div class="sticky box"></div> | |
41 </div> | |
42 </div> | |
43 | |
44 <div class="group" style="top: 100px"> | |
45 <div class="container"> | |
46 <div class="sticky box" style="top: -15px;"></div> | |
47 </div> | |
48 </div> | |
49 | |
50 <div class="group" style="top: 300px"> | |
51 <div class="container"> | |
52 <div class="sticky box" style="top: -200px;"></div> | |
53 </div> | |
54 </div> | |
55 </body> | |
56 </html> | |
OLD | NEW |