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