1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<!DOCTYPE html> <style> div { width: 100px; height: 100px; } #anchored1 { position: absolute; left: 0; top: 0; background: orange; } #anchored2 { position: absolute; left: 0; top: 100px; background: green; } </style> <div id="anchored1"></div> <div id="anchored2"></div>