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

APISummary
## 介绍

设置元件左边框样式的简写属性，按顺序包含 [`border-left-width`](/next/zh/api/css/properties/border-left-width.md)、[`border-left-style`](/next/zh/api/css/properties/border-left-style.md)、[`border-left-color`](/next/zh/api/css/properties/border-left-color.md)。

## 使用示例

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

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

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

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

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

  const styles = [
    ["thick double red", "thin dotted blue"],
    ["10px dashed orange", "medium solid #0000ff"],
    ["5px groove rgba(0,255,0,0.6)", "10rpx ridge hsl(89,43%,51%)"],
    ["thick outset hsla(89,43%,51%,0.3)", "16px inset #ab0"],
  ];

  return (
    <scroll-view className="root" scroll-orientation="vertical" style={scrollViewStyle}>
      <view className="fixed_area" style={fixedAreaStyle}>
        {styles.map((row, rowIndex) => (
          <view key={`normal-${rowIndex}`}>
            <view className="row">
              {row.map((borderStyle, colIndex) => (
                <view
                  key={`normal-${rowIndex}-${colIndex}`}
                  className="box"
                  style={{ borderLeft: borderStyle }}
                >
                  <text className="text">{borderStyle}</text>
                </view>
              ))}
            </view>
          </view>
        ))}

        {styles.map((row, rowIndex) => (
          <view key={`radius-${rowIndex}`}>
            <view className="row">
              {row.map((borderStyle, colIndex) => (
                <view
                  key={`radius-${rowIndex}-${colIndex}`}
                  className={`box radiusStyle${colIndex}`}
                  style={{ borderLeft: borderStyle }}
                >
                  <text className="text">{borderStyle}</text>
                </view>
              ))}
            </view>
          </view>
        ))}
      </view>
    </scroll-view>
  );
};

root.render(<BorderLeft />);

```

v0.11.0



## 语法

```css
border-left: 1px solid red;
```

## 取值

可按顺序设置如下属性：

- [`border-left-width`](/next/zh/api/css/properties/border-left-width.md)
  边框的宽度

- [`border-left-style`](/next/zh/api/css/properties/border-left-style.md)
  边框的样式

- [`border-left-color`](/next/zh/api/css/properties/border-left-color.md)
  边框的颜色

## 形式定义

| 初始值 | 空值 |
| 适用元素 | 所有元件 |
| 是否支持继承 | no |
| 是否支持动画 | no |


## 形式语法

```css
border-left = <line-width> <line-style> <color>
```

## 与 Web 的区别

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

- 不支持 `inherit、initial、revert、unset` 等

## 兼容性

**Compatibility Table**

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

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

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

**`border-left`**

**Specifications:**

