html5 - Is there a way to stack divs on top of each other using flexbox syntax? -
Flexbox problem is expected that someone can help you :)
I created cards from divs Trying to make a deck and stacking them on each other as you are using the situation: absolute
Is there a way to overlay the device at each other using Flexbox?
One way to achieve this is to set a negative margin
" snippet-code-css Lang-CSS toppint -override ">.deck {display: flex; Height: 200 pixels; Flex-direction: column; } .card {height: 100px; Width: 60px; Flex: 100px 1 0; Border: Solid 1px black; Boundary-radius: 5px; Margin-down: -80 pixels; Background color: white; Box-shadow: 3px 3px 3px gray; }
& lt; Div class = "deck" & gt; & Lt; Div class = "card" & gt; 1 & lt; / Div & gt; & Lt; Div class = "card" & gt; 2 & lt; / Div & gt; & Lt; Div class = "card" & gt; 3 & lt; / Div & gt; & Lt; Div class = "card" & gt; 4 & lt; / Div & gt; & Lt; Div class = "card" & gt; 5 & lt; / Div & gt; & Lt; / Div & gt;
Comments
Post a Comment