For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/linear-cross-gravity.md.
Lynx
  • English
  • deprecated linear-cross-gravity

    Warning

    This API is deprecated.

    Introduction

    Set the position of the child element on the cross axis of the parent container in linear layout, is an style on the parent container. Similar to align-items in flexible box layout.

    When using linear-layout-gravity, align-self, linear-cross-gravity, and align-items simultaneously in a linear layout, the priority decreases from the first to the last. A higher-priority style will override a lower-priority style.

    Examples

    Syntax

    linear-cross-gravity: none;
    linear-cross-gravity: start;
    linear-cross-gravity: end;
    linear-cross-gravity: center;
    linear-cross-gravity: stretch;

    Values

    • none

      Default value. When the size of the parent element cross axis size(such as the width when linear-direction: column) is fixed, and the size of the child element in this direction is auto, none will be equivalent to stretch. In other cases it is equivalent to start.

    • start

      Align the beginning of the parent element's cross axis.

    • end

      Align the end of the parent element's cross axis.

    • center

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

    • stretch

      Fill the container's cross axis.

    Formal definition

    Initial valuenone
    Applies tolinear containers
    Inheritedno
    Animatable

    Formal syntax

    linear-cross-gravity = none | start | end | center | stretch

    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.