zoukankan      html  css  js  c++  java
  • css3弹性盒子常用样式属性梳理汇总

    direction

    修改元素排列方式,可单独使用,会影响子元素内部元素排列

    • rtl
      1
      2
      12

    flex-direction

    弹性子元素在父容器中的位置

    • row-reverse
      1
      2
      3
    • column-reverse
      1
      2
      3

    justify-content

    弹性子元素(横向)排列方式,可单独使用,会影响子元素内部元素排列

    • flex-start
      1
      2
      3
    • flex-end
      1
      2
      3
    • center
      1
      2
      3
    • space-between
      1
      2
      3
    • space-around
      1
      2
      3
    • space-evenly
      1
      2
      3

    align-items

    设置或检索弹性盒子元素在侧轴(纵轴)方向上的对齐方式

    • flex-start
      1
      2
      3
    • flex-end
      1
      2
      3
    • center
      1
      2
      3

    flex-wrap

    指定弹性盒子的子元素换行方式

    • wrap
      1
      2
      3
      4
      5
      6
      7
    • wrap-reverse
      1
      2
      3
      4
      5
      6
      7

    align-content

    配合 flex-wrap 使用,设置各个行的对齐

    • flex-start
      1
      2
      3
      4
      5
      6
      7
    • flex-end
      1
      2
      3
      4
      5
      6
      7
    • center
      1
      2
      3
      4
      5
      6
      7
    • space-between
      1
      2
      3
      4
      5
      6
      7
    • space-around
      1
      2
      3
      4
      5
      6
      7
    • space-evenly
      1
      2
      3
      4
      5
      6
      7

    弹性子元素属性

    order

    设置弹性容器内弹性子元素的排序

    • order:-1
      1
      2
      order:-1

    margin

    设置弹性容器内弹性子元素的对齐方式

    • margin-left: auto
      1
      2
      剩余空间居左
    • margin-right: auto
      1
      2
      剩余空间居右
    • margin: auto
      完美居中
    • margin: auto
      完美居中
      完美居中

    align-self

    设置弹性元素自身在侧轴(纵轴)方向上的对齐方式

    • order:-1
      flex-start
      flex-end
      center
      stretch

    flex

    指定弹性子元素如何分配空间

    • order:-1
      flex-start
      flex-end
      center
      stretch
  • 相关阅读:
    Linux 脚本编写基础
    Centos7下修复 视频播放器(先 安装VLC视频播放器)
    用CentOS 7打造合适的科研环境
    Storm与Spark:谁才是我们的实时处理利器
    Nutch 问题杂记
    三、多线程基础-自旋_AQS_多线程上下文
    二、多线程基础-乐观锁_悲观锁_重入锁_读写锁_CAS无锁机制_自旋锁
    一、多线程基础理论-概念_特性_分类_状态_线程池_线程数配置
    六、ibatis1.2.8查询性能优化,实现百万数据zip导出
    二十、oracle通过复合索引优化查询及不走索引的8种情况
  • 原文地址:https://www.cnblogs.com/xyyt/p/13273527.html
Copyright © 2011-2022 走看看