flex布局左右两边靠边
时间: 2023-10-18 12:31:02 浏览: 208
flex布局布局篇
要实现flex布局中左右两边靠边的效果,可以使用justify-content属性来控制主轴方向上的对齐方式。如果想要左右两边分别靠边,可以将justify-content的值设置为space-between。这将使得容器中的子元素沿主轴方向均匀分布,同时第一个子元素和最后一个子元素分别与容器的开始和结束边界对齐,从而实现左右两边靠边的效果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [flex布局 多种方法让两个盒子分布在左右两边](https://blog.csdn.net/m0_59735348/article/details/128112041)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [前端小白刚学习的flex布局分享给大家](https://blog.csdn.net/YJ_YJ_YJ_/article/details/127199786)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文