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

# letter-spacing

APISummary
## 介绍

`letter-spacing` 属性用于设置文本字符的间距表现。

## 使用示例

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

**Entry:** `src/letter-spacing`
**Bundle:** `dist/letter-spacing.lynx.bundle`

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

const LetterSpacing = () => {
  const containerStyle = {
    width: "100%",
    height: "100%",
    flexDirection: "column" as const,
  };

  const headerStyle = {
    backgroundColor: "#ccc",
    marginTop: "10px",
  };

  const text1Style = {
    fontSize: "16px",
    letterSpacing: "0px",
  };

  const text2Style = {
    fontSize: "16px",
    letterSpacing: "1px",
  };

  const text3Style = {
    fontSize: "16px",
    letterSpacing: "3rpx",
  };

  return (
    <scroll-view className="root" scroll-orientation="vertical">
      <view className="fixed_area">
        <view style={containerStyle}>
          <text style={headerStyle}>Letter Spacing Test</text>
          <text style={text1Style}>letter-spacing:0px</text>
          <text style={text2Style}>letter-spacing:1px</text>
          <text style={text3Style}>letter-spacing:3rpx</text>
        </view>
      </view>
    </scroll-view>
  );
};

root.render(<LetterSpacing />);

```

v0.11.0



## 语法

```css
/* <length> values */
letter-spacing: 0.3em;
letter-spacing: 3px;
letter-spacing: 0.3px;
```

### 取值

- [`<length>`](/next/zh/api/css/data-type/length.md)
  指定文字间的间距以替代默认间距。可以是负值。

## 形式定义

| 初始值 | empty value |
| 适用元素 | text |
| 是否支持继承 | yes |
| 是否支持动画 | no |


## 形式语法

```
<length>
```

## 与 Web 的区别

- 不支持 `normal` 关键字。只支持 `<length>`。

## 兼容性

**Compatibility Table**

**Query:** `css.properties.letter-spacing`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| letter-spacing | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`letter-spacing`**

**Specifications:**

