> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# relative-align-bottom

APISummary
## 介绍

在[相对布局](/next/zh/guide/ui/layout/relative-layout.md)中，指定当前元件与父亲或者对应 [`id`](/next/zh/api/css/properties/relative-id.md) 的同级元件的下边缘对齐。

## 使用示例

**下面是一个示例: css-api**

**Entry:** `src/relative-align-bottom`
**Bundle:** `dist/relative-align-bottom.lynx.bundle`

```tsx
import { root } from "@lynx-js/react";
import "./index.scss";

const RelativeAlignBottom = () => {
  const containerStyle = {
    display: "relative" as const,
  };

  const firstViewStyle = {
    display: "linear" as const,
    relativeId: "1",
    relativeCenter: "vertical" as const,
    backgroundColor: "lightgreen",
    alignItems: "center" as const,
    width: "40%",
  };

  const secondViewStyle = {
    display: "linear" as const,
    relativeAlignBottom: "1",
    relativeAlignRight: "parent",
    backgroundColor: "lightblue",
    alignItems: "center" as const,
    width: "40%",
  };

  const thirdViewStyle = {
    relativeAlignBottom: "parent" as const,
    backgroundColor: "pink",
  };

  const textStyle = {
    fontSize: "35rpx" as const,
    fontWeight: "600" as const,
    textAlign: "center" as const,
  };

  return (
    <view className="container" style={containerStyle}>
      <view style={firstViewStyle}>
        <text style={textStyle}>relative-id: 1;</text>
        <text style={textStyle}>relative-center: vertical</text>
      </view>
      <view style={secondViewStyle}>
        <text style={textStyle}>relative-align-bottom: 1;</text>
        <text style={textStyle}>relative-align-right: parent</text>
      </view>
      <view style={thirdViewStyle}>
        <text style={textStyle}>relative-align-bottom: parent</text>
      </view>
    </view>
  );
};

root.render(<RelativeAlignBottom />);

```

v0.11.0



## 语法

```css
relative-align-bottom: parent;
relative-align-bottom: none;

relative-align-bottom: 1;
relative-align-bottom: 2;
```

### 取值

- `none`

  **默认值**。不在下边缘对齐。

- `parent`

  下边缘与父元件对齐。

- `<number>`

  `int` 值。下边缘与此值（参考 [`relative-id`](/next/zh/api/css/properties/relative-id.md)）所对应的同级元件对齐。

  :::info
  [`relative-id`](/next/zh/api/css/properties/relative-id.md) 的设定请注意：`-1` 和 `0` 是特殊值。`-1` 是默认值，代表当前元件不会被视为同级元件的对齐参考标准。不能使用 `0` 作为元件的 id，否则有不符合预期的表现。
  :::

## 形式定义

| 初始值 | `none` |
| 适用元素 | relative items |
| 是否支持继承 | 否 |
| 是否支持动画 |  |


## 形式语法

```
relative-align-bottom = none | parent | <number>
```

## 与 Web 的区别

- Web 无此属性。

## 兼容性

**Compatibility Table**

**Query:** `css.properties.relative-align-bottom`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/134-relative-align-bottom.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| relative-align-bottom | Yes (1.4) | Yes (3.4) | Yes (1.4) | Yes (1.4) | Yes (1.4) | No |

**`relative-align-bottom`**

Specifies that the current element is aligned with the bottom edge of the parent or sibling element corresponding to id.

**Specifications:**

