学习弹性布局

个人理解笔记

父盒子

 display: flex;弹性布局

方向

        flex-direction: row;//水平 从左到右

        flex-direction: row-reverse;//水平 从右到左

        flex-direction: column;//垂直 从上到下

        flex-direction: column-reverse;//垂直 从下到上

是否换行

        flex-wrap: nowrap;//不换

        flex-wrap: wrap;//换 从上而下

        flex-wrap: wrap-reverse;//换 从下而上

 对齐方式(水平)

        justify-content: flex-start;//从左到右

        justify-content: flex-end;//从右到左

        justify-content: space-between;//平等的分开间距

        justify-content: center; //居中

        justify-content: space-around;//每个小板块间距相同

 单线轴(垂直)

        align-items: flex-start; //从上到下

        align-items: flex-end; //从下到上

        align-items: center; //居中

        align-items: baseline; //从第一行文字开始

        align-items: stretch;//没有高度,占满

多线轴

        align-content: flex-start;

        align-content: flex-end;

        align-content: space-between;

        align-content: space-around;

        align-content: center;

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值