Use the flex-wrap Property to Wrap a Row or Column:
CSS flexbox has a feature to split a flex item into multiple rows (or columns). By default, a flex container will fit all flex items together. For example, a row will all be on one line.
However, using the flex-wrap property tells CSS to wrap items. This means extra items move into a new row or column. The break point of where the wrapping happens depends on the size of the items and the size of the container.
CSS also has options for the direction of the wrap:
nowrap: this is the default setting, and does not wrap items.
wrap: wraps items onto multiple lines from top-to-bottom if they are in rows and left-to-right if they are in columns.
wrap-reverse: wraps items onto multiple lines from bottom-to-top if they are in rows and right-to-left if they are in columns.
No comments:
Post a Comment