flex布局垂直居中
时间: 2023-08-31 11:08:53 浏览: 172
要在Flex布局中实现垂直居中,可以使用align-items属性。这个属性可以控制侧轴上子元素的排列方式。在垂直方向上,可以使用align-items: center;来实现垂直居中。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [常用的几种布局方式---Flex 布局(垂直居中展示)](https://blog.csdn.net/weixin_64310738/article/details/129034523)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [flex布局以及实现垂直居中](https://blog.csdn.net/weixin_49519788/article/details/118093101)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文