linear-direction

介绍

linear-direction 定义线性布局中的元件排列方向(默认为垂直布局),该方向作为线性布局的主轴,另外一个方向称为交叉轴

请注意,值 rowrow-reverse 受线性布局中的 direction 影响。例如,如果 dir 属性是 rtl 或者 lynx-rtlrow 表示从右到左定向的轴,而 row-reverse 表示从左到右。

INFO

linear-orientation 已被废弃,并计划在未来版本中移除。

使用示例

语法

linear-direction: column;

/* Like <column>, but reversed */
linear-direction: column-reverse;

linear-direction: row;

/* Like <row>, but reversed */
linear-direction: row-reverse;

取值

  • column

    默认值。线性布局中的元件按照垂直方向进行布局。主轴的方向为垂直方向。

  • row

    线性布局中的元件按照水平方向进行布局。主轴的方向为水平方向。

  • column-reverse

    column 表现一致,但是置换了主轴起点和主轴终点。

  • row-reverse

    row 的表现一致,但是置换了主轴起点和主轴终点。

  • vertical Deprecated

    column

  • horizontal Deprecated

    row

  • horizontal-reverse Deprecated

    row-reverse

  • vertical-reverse Deprecated

    column-reverse

形式定义

初始值column
适用元素线性容器
是否支持继承
是否支持动画

形式语法

linear-direction = column | row | column-reverse | row-reverse

与 Web 的区别

  • Web 无该样式。

兼容性

LCD tables only load in the browser

除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。