row-negative-margin-001-ref.html (619B)
1 <!DOCTYPE html> 2 <html> 3 <body> 4 <p>When an item with negative margins are placed, ensure the items after it are placed immediately behind it</p> 5 <div style="display: flex;"> 6 <div style="background: aquamarine; width: 50px;" > 7 item 1 8 </div> 9 <div style="background: aquamarine; width: 50px;" > 10 item 1 11 </div> 12 <div style="background: aquamarine; width: 50px;" > 13 item 1 14 </div> 15 <div style="background: lightblue; width: 50px; margin-left: -100px;" > 16 item 2 17 </div> 18 <div style="background: lightpink; width: 50px;"> 19 item 3 20 </div> 21 </div> 22 </body> 23 </html>