flex-direction chooses the main axis: row (default), column, or reverses. flex-wrap:wrap lets items flow onto new lines instead of squishing. gap spaces items cleanly. The shorthand flex-flow combines direction and wrap.
flex-direction chooses the main axis: row (default), column, or reverses. flex-wrap:wrap lets items flow onto new lines instead of squishing. gap spaces items cleanly. The shorthand flex-flow combines direction and wrap.
<!doctype html><html><head><meta charset="utf-8">
<style>.f{display:flex;flex-wrap:wrap;gap:8px}.f span{background:#b388ff;color:#06040d;padding:6px 12px;border-radius:999px}</style></head><body style="background:#06040d;padding:20px"><div class="f"><span>one</span><span>two</span><span>three</span><span>four</span></div></body></html>▶ Open the interactive comic issue