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

APISummary
## 介绍

`border-left-color` 属性设置元件的左边框颜色。值得注意的是，在大多数情况下使用 [`border-color`](/next/zh/api/css/properties/border-color.md) 或 [`border-left`](/next/zh/api/css/properties/border-left.md) 更加方便和普遍。

## 使用示例

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

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

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

const BorderLeftColor = () => {
  return (
    <view className="intro">
      <text className="border-color">
        {"\n border-left-color: red; \n border-right-color: blue; \n border-top-color: green; \n border-bottom-color: black; \n"}
      </text>
    </view>
  );
};

root.render(<BorderLeftColor />);

```

v0.11.0



## 语法

```css
border-left-color: red;
border-left-color: #ffbb00;
border-left-color: rgb(255, 0, 0);
border-left-color: hsla(100%, 50%, 25%, 0.75);
```

### 取值

- [`<color>`](/next/zh/api/css/data-type/color.md)

## 形式定义

| 初始值 | 透明色 |
| 适用元素 | all elements |
| 是否支持继承 | no |
| 是否支持动画 | yes |


## 形式语法

```
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color>
```

## 与 Web 的区别

- 不支持 `Global values` 例如：`inherit`，`initial`，`unset`

## 兼容性

**Compatibility Table**

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

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

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

**`border-left-color`**

**Specifications:**

