|
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 } |
|
11 #contain { |
|
12 height: 100px; |
|
13 background-color: gray; |
|
14 } |
|
15 #sticky { |
|
16 position: relative; |
|
17 top: 10px; |
|
18 height: 10px; |
|
19 background-color: black; |
|
20 z-index: 1; |
|
21 } |
|
22 #static { |
|
23 position: relative; |
|
24 bottom: 1px; |
|
25 height: 10px; |
|
26 background-color: blue; |
|
27 } |
|
28 </style> |
|
29 </head> |
|
30 <body> |
|
31 <div id="scroll"> |
|
32 <div id="contain"> |
|
33 <div id="sticky"></div> |
|
34 <div id="static"></div> |
|
35 </div> |
|
36 </div> |
|
37 </body> |
|
38 </html> |