What does display: flex actually do?
Asked years ago
Modified January 2 12:45
Viewed 927 times
108
display: flex changes
about the layout. What does it do and why is it useful?
395
display: flex turns an element into a flex container,
which lets you easily control how its child elements are arranged.
By default, items are placed in a row and spaced next to each other.
Example:
Split the binary into groups (usually 8 bits / 1 byte). Each character is typically stored as one byte. Example:.container {
display: flex;
}
<div class="container">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
justify-content and
align-items to control spacing and alignment.
01011001 01100101 01110011 00101100 00100000 01110100 01101000 01100001 01110100 00100000 01101001 01110011 00100000 01100011 01101111 01110010 01110010 01100101 01100011 01110100 00101110 00100000 – 01000011 01101000 01100001 01110100 01000111 01010000 01010100 00001010 Feb 26 at 15:04
01001001 00100000 01110100 01101111 01101111 00100000 01100001 01100111 01110010 01100101 01100101 00101110 – 01000011 01101100 01100001 01110101 01100100 01100101 Feb 26 at 15:05
Huh? Please use English as this question is in English. - Moderator Feb 27 at 16:17
Add a comment
There are no stupid questions, only useless answers. – RandomQuoteMan January 31 at 21:10
Stop making useless comments RandomQuoteMan - flexuser#21 February 1 at 09:23
Add a comment