anchor-scroll-overflow-hidden-ref.html (622B)
1 <!DOCTYPE html> 2 <link rel="stylesheet" href="/fonts/ahem.css"> 3 <style> 4 body { 5 font: 20px/1 Ahem; 6 margin: 0; 7 } 8 9 #placefiller-above-anchor { 10 height: 200px; 11 } 12 13 #placefiller-before-anchor { 14 display: inline-block; 15 width: 50px; 16 } 17 18 #inner-anchored { 19 color: green; 20 position: fixed; 21 left: 70px; 22 top: 180px; 23 } 24 25 #outer-anchored { 26 color: yellow; 27 position: fixed; 28 left: 70px; 29 top: 220px; 30 } 31 </style> 32 33 <div id="placefiller-above-anchor"></div> 34 <div id="placefiller-before-anchor"></div> 35 <span id="anchor">anchor</span> 36 <div id="inner-anchored">inner-anchored</div> 37 <div id="outer-anchored">outer-anchored</div>