How to Overlap Flex Items with CSS Flexbox - Beginner Tutorial

Veröffentlicht am: 08 November 2021
auf dem Kanal: Front End Beginners
15,198
201

In this video, we'll look at how to overlap flex items in CSS Flexbox.

The first method is using "position: relative" in combination with top, bottom, left, or right values.

The second method is using the CSS "transform: translate()" property, which allows us to reposition items along both the X- and Y-axis.

Re-positioned items are given a new "stacking context", which means they'll be stacked on top of other HTML elements regardless of their original source order.

To overcome this, we need to give the affected elements a position of "relative", which brings them into the new stacking context and restores the default order.

I hope you found this video helpful. If you have any questions, please leave them in the comments below and I'll do my best to answer as soon as possible.

TIMESTAMPS:
00:00 Introduction
00:29 Method one - "position: relative"
02:00 Method two - "transform: translate()"
03:11 Overlapping and the "stacking context"
06:10 Summary

WATCH NEXT:
• How to Use CSS Position Relative -    • How to Use CSS Position Relative - A ...  
• How to Make One Flex Item Full-Width -    • How to Make One Flex Item Full-Width ...  
• Create a Responsive Grid Layout with CSS Flexbox -    • How to Create a Grid Layout with CSS ...  


Auf dieser Seite können Sie das Online-Video How to Overlap Flex Items with CSS Flexbox - Beginner Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Front End Beginners 08 November 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 15,198 Mal angesehen und es wurde von 201 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!