Deprecated linear-gravity

WARNING

This API is deprecated.

Introduction

The CSS linear-gravity property defines how distributes space between and around content items along the main-axis of a linear container. Similar to flexible box layout justify-content.

INFO

When using justify-content and linear-gravity both, linear-gravity will override justify-content.

Examples

Syntax

linear-gravity: none;
linear-gravity: start;
linear-gravity: end;
linear-gravity: center;
linear-gravity: space-between;

Values

  • none

    Default value. It is equivalent to start.

  • start

    Align the beginning of the parent element main axis.

  • end

    Align the end of the parent element main axis.

  • center

    Align the center of the parent element's main axis.

  • space-between

In the corresponding layout direction, the two ends are aligned and the middle interval is equal.

  • top Deprecated

    Not recommended, it is recommended to use start. Align up, vertical layout takes effect.

  • bottom Deprecated

    Not recommended, it is recommended to use end. Align down, vertical layout takes effect.

  • left Deprecated

    Not recommended, it is recommended to use start. Align left, horizontal layout takes effect.

  • right Deprecated

    Not recommended, it is recommended to use end. Align right, horizontal layout takes effect.

  • center-vertical Deprecated

    Not recommended, it is recommended to use center. Centered vertically, vertical layout takes effect.

  • center-horizontal Deprecated

    Not recommended, it is recommended to use center. Centered horizontally, horizontal layout takes effect.

Formal definition

Initial valuenone
Applies tolinear containers
Inheritedno
Animatable

Formal syntax

linear-gravity = none | start | end | center | space-between

Difference between web

  • No such style in Web.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.