|
1 <!DOCTYPE html> |
|
2 <!-- Any copyright is dedicated to the Public Domain. |
|
3 - http://creativecommons.org/publicdomain/zero/1.0/ --> |
|
4 <html> |
|
5 <head> |
|
6 <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com"> |
|
7 <style> |
|
8 #scroll { |
|
9 height: 100px; |
|
10 overflow: hidden; |
|
11 } |
|
12 #contain { |
|
13 height: 200px; |
|
14 background-color: gray; |
|
15 } |
|
16 #sticky { |
|
17 position: relative; |
|
18 height: 10px; |
|
19 background-color: black; |
|
20 } |
|
21 </style> |
|
22 </head> |
|
23 <body> |
|
24 <div id="scroll"> |
|
25 <div style="height: 20px"></div> |
|
26 <div id="contain"> |
|
27 <div style="height: 60px"></div> |
|
28 <div id="sticky"></div> |
|
29 </div> |
|
30 </div> |
|
31 </body> |
|
32 </html> |