I think it's faster to describe my question in images.
- I have some flex rectangle cards and a flex container.
- I applied
rotate(90deg)
to one of the cards, the cards are 1:2 so I was expecting the other cards would be pushed left and right, which did not happen - I applied
align-items: flex-end;
to the flex container, because I wanted the card to "touch the ground" after rotating, which did not happen either
What should I do to make that 2 effects ;(
<div class="container">
<div class="item">
<div id="card"></div>
</div>
<div class="item">
<div id="card"></div>
</div>
<div class="item spin">
<div id="card"></div>
</div>
<div class="item">
<div id="card"></div>
</div>
</div>
#card {
border: 8px black solid;
aspect-ratio: 1/2;
background-color: red;
}
.container {
display: flex;
justify-content: flex-start;
align-items: flex-end;
width: 100%;
gap: 5px;
}
.item {
flex-grow: 1;
max-width: 100px;
}
.spin {
transform: rotate(90deg);
}