一 容器的属性
1 flex-direction
flex-direction的值:
- row
- row-reverse
- column
- column-reverse
2 flex-wrap
1
2
3
4
5
6
7
8
9
10
12
12
13
14
15
16
17
18
19
20
21
3 justify-content
justify-content的属性值:
- flex-start
- flex-end
- center
- space-between
- space-aroundspace-between
4 align-items
align-items的属性值:
- flex-start
- flex-end
- center
- baseline
- stretch
5 align-content
1
2
3
4
5
6
7
8
9
10
12
12
13
14
15
16
17
18
19
20
21
align-content的属性值:
- flex-start
- flex-end
- center
- space-between
- space-around
- stretch
二 项目的属性
1 order
order的属性值:
- 1,2,3
- 1,3,2
- 2,1,3
- 2,3,1
- 3,1,2
- 3,2,1
2 flex-grow
3 flex-shrink
1
2
3
4
5
6
7
8
9
10
12
12
13
14
15
16
17
18
19
20
21
4 align-self
只设置第一个div的align-self
align-self的属性值:
- auto
- flex-start
- flex-end
- center
- baseline
- stretch