> 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.

# border-top-left-radius

APISummary
## 介绍

用于添加左上角圆角边框。第一个值是水平半径，第二个值是垂直半径。如果省略第二个值，则复制第一个值。如果长度为零，则边角为方形，而不是圆形。水平半径的百分比值参考边框盒的宽度，而垂直半径的百分比值参考边框盒的高度。

## 使用示例

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

**Entry:** `src/border-top-left-radius`
**Bundle:** `dist/border-top-left-radius.lynx.bundle`

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

const BorderTopLeftRadius = () => {
  const scrollViewStyle = {
    height: "100%",
  };

  const fixedAreaStyle = {
    width: "100%",
    height: "100%",
    flexDirection: "column" as const,
  };

  const styles = [
    ["2em", "2em 5em"],
    ["100px 500px", "50px 15px"],
    ["200px", "200em 100em"],
  ];

  return (
    <scroll-view className="root" scroll-orientation="vertical" style={scrollViewStyle}>
      <view className="fixed_area" style={fixedAreaStyle}>
        {styles.map((row, rowIndex) => (
          <view key={`same-${rowIndex}`}>
            <view className="row">
              {row.map((radius, colIndex) => (
                <view
                  key={`same-${rowIndex}-${colIndex}`}
                  className={`box size0 styleDiff${colIndex} colorWidthSame`}
                  style={{ borderTopLeftRadius: radius }}
                >
                  <text className="text">{radius}</text>
                </view>
              ))}
            </view>
          </view>
        ))}

        {styles.map((row, rowIndex) => (
          <view key={`diff-${rowIndex}`}>
            <view className="row">
              {row.map((radius, colIndex) => (
                <view
                  key={`diff-${rowIndex}-${colIndex}`}
                  className={`box size0 colorWidthDiff${colIndex}`}
                  style={{ borderTopLeftRadius: radius }}
                >
                  <text className="text">{radius}</text>
                </view>
              ))}
            </view>
          </view>
        ))}

        {styles.map((row, rowIndex) => (
          <view key={`mixed-${rowIndex}`}>
            <view className="row">
              {row.map((radius, colIndex) => (
                <view
                  key={`mixed1-${rowIndex}-${colIndex}`}
                  className={`box size1 styleDiff${colIndex} colorWidthDiff${colIndex}`}
                  style={{ borderTopLeftRadius: radius }}
                >
                  <text className="text">{radius}</text>
                </view>
              ))}
              {row.map((radius, colIndex) => (
                <view
                  key={`mixed2-${rowIndex}-${colIndex}`}
                  className={`box size2 colorWidthSame styleDiff2`}
                  style={{ borderTopLeftRadius: radius }}
                >
                  <text className="text">{radius}</text>
                </view>
              ))}
            </view>
          </view>
        ))}
      </view>
    </scroll-view>
  );
};

root.render(<BorderTopLeftRadius />);

```

v0.11.0



## 语法

```css
/* the corner is a circle */
/* border-top-left-radius: radius */
border-top-left-radius: 3px;

/* the corner is an ellipsis */
/* border-top-left-radius: horizontal vertical */
border-top-left-radius: 0.5em 1em;
```

### 取值

- [`<length>`](/next/zh/api/css/data-type/length.md)
  定义圆角的形状。

- [`<percentage>`](/next/zh/api/css/data-type/percentage.md)
  以百分比定义圆角的形状

## 形式定义

| 初始值 | 0 |
| 适用元素 | all elements |
| 是否支持继承 | no |
| 是否支持动画 | no |


## 形式语法

```
[<length> | <percentage>] [ / [<length> | <percentage>]]?
```

## 与 Web 的区别

- [mdn:border-top-left-radius](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius)

不支持 inherit、initial、revert、unset 等

## 兼容性

**Compatibility Table**

**Query:** `css.properties.border-top-left-radius`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/13-border-top-left-radius.json) · [MDN](https://developer.mozilla.org/zh-CN/docs/Web/CSS/border-top-left-radius)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| border-top-left-radius | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`border-top-left-radius`**

**Specifications:**

