
CSS
1. 垂直居中对齐:

AI
display: flex;
justify-content: center; /* 水平居中对齐 */
align-items: center; /* 垂直居中对齐 */
}
2. 底部对齐:
.contAIner {
display: flex;
flex-direction: column; /* 确保子元素竖直排列 */
justify-content: flex-end; /* 底部对齐 */
}
3. 顶部对齐:
.contAIner {
display: flex;
flex-direction: column; /* 确保子元素竖直排列 */
justify-content: flex-start; /* 顶部对齐 */
}
4. 分散对齐:
.contAIner {
display: flex;
justify-content: space-between; /* 分散对齐 */
}
5. 等分对齐:
.contAIner {
display: flex;
justify-content: space-around; /* 等分对齐 */
}
Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号