Home>Article>Web Front-end> How to use CSS flexible box model flex in layout
Application of CSS flexible box model flex in layout
Element centering
【1】Use main-axis alignment justify-content and cross-axis alignment align-items on the scalable container
DEMO
【2】Use margin:auto
DEMO
## on the scalable item #Align both ends
DEMODEMODEMODEMO
Align bottom
DEMODEMODEMODEMO
Input box button
etc. Sub-layout
1234
Multi-column adaptive layout
left
left
center
center
right
right
Hanging layout
左侧悬挂主要内容主要内容主要内容主要内容主要内容主要内容主要内容主要内容主要内容主要内容主要内容主要内容主要内容
Full screen layout
The above is the entire application of CSS flexible box model flex in layout. Related references:top
left
right
bottom
##
The above is the detailed content of How to use CSS flexible box model flex in layout. For more information, please follow other related articles on the PHP Chinese website!