flex-flow

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

flex-flow CSS свойство, которое является сокращением для отдельных свойств flex-direction и flex-wrap.

css
/* flex-flow: <'flex-direction'> */
flex-flow: row;
flex-flow: row-reverse;
flex-flow: column;
flex-flow: column-reverse;

/* flex-flow: <'flex-wrap'> */
flex-flow: nowrap;
flex-flow: wrap;
flex-flow: wrap-reverse;

/* flex-flow: <'flex-direction'> and <'flex-wrap'> */
flex-flow: row nowrap;
flex-flow: column wrap;
flex-flow: column-reverse wrap-reverse;

/* Global values */
flex-flow: inherit;
flex-flow: initial;
flex-flow: unset;
Начальное значениекак и у каждого из подсвойств этого свойства:
Применяется кflex-контейнеры
Наследуетсянет
Обработка значениякак и у каждого из подсвойств этого свойства:
Animation typeкак и у каждого из подсвойств этого свойства:

Больше информации и свойств описано в Using CSS flexible boxes.

Синтаксис

Значения

Смотрите flex-direction и flex-wrap.

Формальный синтаксис

flex-flow = 
<'flex-direction'> ||
<'flex-wrap'>

<flex-direction> =
row |
row-reverse |
column |
column-reverse

<flex-wrap> =
nowrap |
wrap |
wrap-reverse

Примеры

css
element {
  /* Main-axis is the block direction with reversed main-start and main-end. Flex items are laid out in multiple lines */
  flex-flow: column-reverse wrap;
}

Спецификации

Specification
CSS Flexible Box Layout Module Level 1
# flex-flow-property

Совместимость с браузерами

Смотрите также