CSS Flex中Align/Justify和Content/Items的差别

本文解释了在文本格式化中,align和justify这两个术语的区别。align涉及整体布局,而justify则针对文本内部的均匀填充边距。在横置内容时,它们分别对应主轴和次轴的对齐。链接提供了更详细的区分和使用说明。
摘要由CSDN通过智能技术生成

英语释义:"align" is a broader term that refers to arranging objects or concepts in a straight line or proper position, while "justify" specifically deals with aligning text to create even margins on both sides. In the context of text formatting, "align" might refer to the overall alignment of a block, and "justify" specifically refers to how the text within that block is aligned.

简单来说,虽然中文都叫对齐,但Justify是相对主轴对齐,而Align是相对次轴对齐的

当内容是(默认)横着的的时候,也即content-dirction: row,我们的block就是整个行的空间,也就是所谓的主轴为横轴、次轴为纵轴,此时相对纵轴移动时就是整个block在动。

详情见:

justify/align-content/items使用区别icon-default.png?t=N7T8https://blog.csdn.net/grx1125/article/details/128785335

  • 8
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhenzzzzzzz

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值