position-visibility-anchors-visible-chained-004-ref.html (562B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <style> 4 #scroll-container { 5 overflow: hidden scroll; 6 scrollbar-width: none; 7 width: 300px; 8 height: 100px; 9 } 10 11 #anchor { 12 width: 100px; 13 height: 100px; 14 background: orange; 15 margin-bottom: 100px; 16 } 17 18 #chained { 19 width: 100px; 20 height: 50px; 21 background: blue; 22 } 23 24 #target { 25 width: 100px; 26 height: 50px; 27 background: green; 28 } 29 </style> 30 31 <div id="scroll-container"> 32 <div id="anchor">anchor1</div> 33 </div> 34 <div id="chained">chained</div> 35 <div id="target">target</div>