Skip to content

Instantly share code, notes, and snippets.

@amorkovin
Last active October 29, 2020 11:38
Show Gist options
  • Save amorkovin/8f01a263438ca654144c12eed563716a to your computer and use it in GitHub Desktop.
Save amorkovin/8f01a263438ca654144c12eed563716a to your computer and use it in GitHub Desktop.
Flex разное
Перенос на следующую строку
flex-wrap: wrap;
justify-content — управляет выравниванием элементов по главной оси.
По умолчанию выстраивает элементы в начале блока. justify-content: flex-start
justify-content: flex-start;
justify-content: flex-end;
justify-content: center;
justify-content: space-between;
justify-content: space-around;
justify-content: stretch;
align-items — управляет выравниванием элементов по перекрёстной оси.
По умолчанию растягивает элементы по высоте. align-items: stretch
align-items: flex-start
align-items: flex-end
align-items: center
align-items: stretch
align-items: baseline
flex-direction: column — изменяет направление главной оси на вертикальное.
// Сентрирование по высоте и ширине содержимого
display: flex;
justify-content: center;
align-items: center;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment