美文网首页
【连载】flex布局[flex-direction 之 2]

【连载】flex布局[flex-direction 之 2]

作者: 魔介 | 来源:发表于2017-06-22 16:07 被阅读0次

flex-direction

flex-direction的作用是设置元素在主轴上的排列方向。
取值为:

row :x轴左对齐排列
row-reverse: x轴右对齐倒序排列
column:y轴顶对齐排列
column-reverse:y轴第对齐倒序排列

实例: row

.panel{ 
      display: flex;display: -webkit-flex;   width:500px; height: 80px;       
      background: #FFFFCC;
}

.panel .item{
    flex-direction:row;
}
flex-direction-row.png

实例: row-reverse

.panel{ 
      display: flex;display: -webkit-flex;   width:500px; height: 80px;       
      background: #FFFFCC;
}

.panel .item{
    flex-direction:row-reverse;
}
flex-direction-row-reverse.png

实例: column

.panel{ 
      display: flex;display: -webkit-flex;   width:500px; height: 80px;       
      background: #FFFFCC;
}

.panel .item{
    flex-direction:column;
}
column.png

实例: column-reverse

.panel{ 
      display: flex;display: -webkit-flex;   width:500px; height: 80px;       
      background: #FFFFCC;
}

.panel .item{
    flex-direction:column-reverse;
}
column-reverse.png

上一篇:【连载】flex布局[概述 之 1]
下一篇:【连载】flex布局[flex-wrap 之 3]


相关文章

  • 【连载】flex布局[flex-direction 之 2]

    flex-direction flex-direction的作用是设置元素在主轴上的排列方向。取值为: 实例: r...

  • 2018-10-10

    flex布局 display: flex; //水平 flex-direction: row;(默认) flex-...

  • flex 布局 教程笔记

    flex 布局 容器属性flex-flow [flex-direction][flex-...

  • 【前端】flex布局

    flex分为父项布局和子项布局 flex父项常见布局 flex-direction: row row-rever...

  • 微信小程序UI

    布局基础 flex布局基础 flex容器属性 flex-direction决定元素的排列方向flex-wrap决定...

  • Flex布局

    四栏布局 两栏布局 三栏布局 平均布局 flex布局 flex-direction:定义主轴方向 row: 元素摆...

  • Uni-APP笔记

    1、Flex布局:设置父元素为 display:flex; flex-direction:row; 子元素会被...

  • 2018-12-25,flex布局

    flex布局的属性: flex-container的属性有flex-direction, flex-wrap, j...

  • 【CSS】面试知识整理

    手写clearfix flex布局 flex-direction 主轴的方向 justify-content 主轴...

  • flex 布局

    flex 布局基本概念 flex container 的主要属性 flex-direction 方向 (默认r...

网友评论

      本文标题:【连载】flex布局[flex-direction 之 2]

      本文链接:https://www.haomeiwen.com/subject/ftyfcxtx.html