OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 | |
3 <html> | |
4 <head> | |
5 <style> | |
6 body { | |
7 margin: 0; | |
8 } | |
9 | |
10 .group { | |
11 position: relative; | |
12 width: 500px; | |
13 height: 200px; | |
14 } | |
15 | |
16 .container { | |
17 width: 400px; | |
18 height: 180px; | |
19 outline: 2px solid black; | |
20 } | |
21 | |
22 .box { | |
23 width: 200px; | |
24 height: 180px; | |
25 } | |
26 | |
27 .sticky { | |
28 background-color: green; | |
29 position: absolute; | |
30 } | |
31 | |
32 .indicator { | |
33 position: absolute; | |
34 top: 0; | |
35 left: 0; | |
36 background-color: red; | |
37 } | |
38 </style> | |
39 </head> | |
40 <body> | |
41 <div class="group" style="left: -100px;"> | |
42 <div class="indicator box" style="left: 200px;"></div> | |
43 <div class="container"> | |
44 <div class="sticky box" style="left: 200px"></div> | |
45 </div> | |
46 </div> | |
47 | |
48 <div class="group" style="left: 0"> | |
49 <div class="indicator box" style="left: 100px;"></div> | |
50 <div class="container"> | |
51 <div class="sticky box" style="left: 100px"></div> | |
52 </div> | |
53 </div> | |
54 | |
55 <div class="group" style="left: 100px"> | |
56 <div class="indicator box" style="left: 0;"></div> | |
57 <div class="container"> | |
58 <div class="sticky box" style="left: 0"></div> | |
59 </div> | |
60 </div> | |
61 </body> | |
62 </html> | |
OLD | NEW |