Flexbox lays a set of boxes out in one dimension and shares the free space among them. Set display: flex on a container and its direct children become flex items that line up in a row (or column) and can grow, shrink, and align together. This tool turns every property into a button so you can see each effect immediately.
flex-direction decides the main axis: row runs left-to-right, column runs top-to-bottom. justify-content aligns items along that main axis, while align-items aligns them along the perpendicular cross axis. Once you know which axis a property acts on, justify-content and align-items stop being confusing.
Common questions and answers about this topic.
justify-content aligns items along the main axis (the direction set by flex-direction); align-items aligns them along the cross axis (perpendicular to it). Flip flex-direction between row and column here and watch which one moves the boxes.
flex is shorthand for flex-grow, flex-shrink, and flex-basis in that order. 0 1 auto means the item will not grow, may shrink if space runs out, and starts at its content size. Select a box and edit the three values to see the shorthand in the generated CSS.
No. Everything runs entirely in your browser, and nothing you enter leaves your device.