Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Shorthand flex-flow | Understanding Flexbox Basics
CSS Flexbox Foundations

bookShorthand flex-flow

The flex-flow property in CSS is a shorthand that lets you set both the flex-direction and flex-wrap properties in a single line. This shorthand is especially useful for quickly controlling how flex items are laid out and whether they wrap or not.

The syntax for flex-flow is simple: write the direction first, followed by the wrap value, separated by a space. For example, flex-flow: row wrap; applies a horizontal layout with wrapping, while flex-flow: column nowrap; arranges items vertically without wrapping. Use cases for flex-flow include situations where you want to define both the main axis direction and the wrapping behavior together, making your CSS more concise and easier to read.

index.html

index.html

copy

Using flex-flow in your CSS, as shown above, simplifies your code by combining two properties into one. Instead of writing:

.container {
  flex-direction: column;
  flex-wrap: wrap;
}

you can write:

.container {
  flex-flow: column wrap;
}
question mark

Which flex-flow value would create a row-reverse layout with wrapping?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 5

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Suggested prompts:

Can you explain the possible values for `flex-direction` and `flex-wrap`?

What happens if I only specify one value in `flex-flow`?

Can you give more examples of using `flex-flow` in different layouts?

Awesome!

Completion rate improved to 7.69

bookShorthand flex-flow

Swipe um das Menü anzuzeigen

The flex-flow property in CSS is a shorthand that lets you set both the flex-direction and flex-wrap properties in a single line. This shorthand is especially useful for quickly controlling how flex items are laid out and whether they wrap or not.

The syntax for flex-flow is simple: write the direction first, followed by the wrap value, separated by a space. For example, flex-flow: row wrap; applies a horizontal layout with wrapping, while flex-flow: column nowrap; arranges items vertically without wrapping. Use cases for flex-flow include situations where you want to define both the main axis direction and the wrapping behavior together, making your CSS more concise and easier to read.

index.html

index.html

copy

Using flex-flow in your CSS, as shown above, simplifies your code by combining two properties into one. Instead of writing:

.container {
  flex-direction: column;
  flex-wrap: wrap;
}

you can write:

.container {
  flex-flow: column wrap;
}
question mark

Which flex-flow value would create a row-reverse layout with wrapping?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 5
some-alt