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

# CSS 能力清单

开发样式时，先通过本页确认 CSS 属性和取值是否可用。本页列出豆包应用插件当前文档承诺的 CSS 能力范围；需要进一步理解布局、选择器、文本承载和动画等行为差异时，再阅读[样式与布局差异](/apps-plugin/docs/client-framework/styling.md)。豆包应用插件使用 [Lynx](https://lynxjs.org/zh/) 作为 UI 渲染器，其 CSS 能力不等同于浏览器的完整 CSS 规范。

判断规则：

- “支持的值”中的属性和值可以用于豆包应用插件；
- “不支持的值”需要使用其它布局、元素或样式方案替代；
- 未出现在本清单中的 CSS 属性或取值，当前不属于豆包应用插件的支持范围，不能默认与 Web 一致；
- 开发者只需要以本清单描述的当前能力为准，不自行推断未列出的属性或取值；

查询具体能力时，使用页面搜索直接输入属性名，例如 `display`、`gap` 或 `text-overflow`。同一行同时给出当前支持和明确不支持的取值。

> **注意**
>
> - 本清单只说明样式属性和值，选择器、节点、文本承载和布局行为请阅读[样式与布局差异](/apps-plugin/docs/client-framework/styling.md)；
> - 即使某个属性受支持，也应在真实目标端检查文本测量、滚动、层叠和动画效果；
> - 关键容器应显式声明布局、尺寸和盒模型，不依赖 Web 默认样式；

## 重点使用限制

| 能力                            | 当前限制                                                                             | 推荐处理                                                                  |
| ----------------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `calc()`                      | 只用于宽高等布局相关属性，不用于 `background` 等绘制属性                                              | 复杂绘制值改用明确数值或拆分样式                                                      |
| `fit-content` / `max-content` | 用于 `width`、`height` 和 Grid 轨道尺寸；`fit-content` 的最小尺寸按 0 处理                        | 关键尺寸优先显式设置，并检查空内容场景                                                   |
| `position: sticky`            | 用于 `scroll-view` 的子元素，需要设置至少一个定位边                                                | 使用 `top`、`left` 等声明吸附阈值                                               |
| `overflow: scroll`            | 不支持通过 CSS 将普通节点变成滚动容器                                                            | 使用 `scroll-view` 承载滚动内容                                               |
| `@media`                      | 当前不支持                                                                            | 使用 `%`、`vw` / `vh`、`rem`、`rpx` 和 Flex / Grid 组织自适应布局                  |
| Grid 定位                       | `grid-area` 当前不属于支持范围；不使用非标准的 `grid-column-span`、`grid-row-span`                 | 使用 `grid-column`、`grid-row`，或在 `grid-*-start/end` 中使用 `span <number>` |
| RGB / HSL 颜色函数                | 函数参数需要使用逗号分隔                                                                     | 使用 `rgba(255, 255, 255, 0.8)` 这类写法                                    |
| `font-family`                 | 一次只设置一个字体族                                                                       | 不使用 Web 字体回退列表                                                        |
| `text-shadow`                 | 只支持一个阴影，模糊半径不超过 25                                                               | 避免叠加多组文本阴影                                                            |
| 渐变色标                          | 色标位置使用百分比，不支持 `color-hint`                                                       | 使用 `linear-gradient(... 0%, ... 100%)`                                |
| `transition` 的宽高动画            | `width` 或 `height` 为 `auto` 时不执行过渡动画                                             | 动画开始和结束状态使用可计算尺寸                                                      |
| `steps()`                     | 必须提供方向参数，`steps(4)` 无效                                                           | 使用 `steps(4, end)` 或其它完整方向参数                                          |
| `content`                     | 能力有限，不建议依赖；`::before` 和 `::after` 不能用于生成内容                                       | 增加真实 Lynx 元素                                                          |
| `filter`                      | 支持 `blur()`、`grayscale()`、`brightness()`、`contrast()` 和 `saturate()`；每条声明只使用一个函数 | 多个效果需要拆分到不同节点，或使用处理后的资源                                               |
| Transform                     | 不支持 `transform-style: preserve-3d`                                               | Lynx 仅按 `flat` 渲染，不要依赖父子节点组成嵌套 3D 场景                                  |

## 单位与尺寸

| 属性             | 支持的值                                                                                  | 不支持的值                                                    |
| -------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| `长度单位`         | `auto`、`%`、`px`、`rpx`、`rem`、`em`、`vh`、`vw`、`ppx`、`calc()`、`fit-content`、`max-content` | `env()`、`ch`、`ex`、`cm`、`mm`、`in`、`pt`、`pc`、`min-content` |
| `top`          | `<length>`                                                                            | —                                                        |
| `left`         | `<length>`                                                                            | —                                                        |
| `right`        | `<length>`                                                                            | —                                                        |
| `bottom`       | `<length>`                                                                            | —                                                        |
| `box-sizing`   | `border-box`、`content-box`                                                            | —                                                        |
| `height`       | `<length>`、`fit-content`、`max-content`                                                | —                                                        |
| `width`        | `与 height 相同`                                                                         | —                                                        |
| `max-width`    | `<length>`                                                                            | `fit-content`、`max-content`                              |
| `min-width`    | `与 max-width 相同`                                                                      | —                                                        |
| `max-height`   | `与 max-width 相同`                                                                      | —                                                        |
| `min-height`   | `与 max-width 相同`                                                                      | —                                                        |
| `aspect-ratio` | `<number>/<number>`                                                                   | —                                                        |

## 显示、定位与滚动

| 属性                   | 支持的值                                   | 不支持的值                                    |
| -------------------- | -------------------------------------- | ---------------------------------------- |
| `position`           | `relative`、`absolute`、`fixed`、`sticky` | `static`                                 |
| `display`            | `flex`、`none`、`linear`、`grid`          | `block`、`inline`、`inline-block`、`table*` |
| `overflow`           | `visible`、`hidden`                     | `scroll`                                 |
| `overflow-y`         | `与 overflow 相同`                        | —                                        |
| `visibility`         | `visible`、`hidden`                     | —                                        |
| `vertical-align`     | 支持（按属性语法使用）                            | —                                        |
| `direction`          | `normal`、`ltr`、`rtl`                   | —                                        |
| `z-index`            | `<number>`                             | —                                        |
| `inset-inline-start` | `<length>`                             | —                                        |
| `inset-inline-end`   | `<length>`                             | —                                        |

## Flex 布局

| 属性                | 支持的值                                                                           | 不支持的值 |
| ----------------- | ------------------------------------------------------------------------------ | ----- |
| `flex`            | `<flex-grow> <flex-shrink>?`，或单独设置 `<flex-basis>`                              | —     |
| `flex-flow`       | `<flex-direction>` 与可选的 `<flex-wrap>`                                          | —     |
| `flex-grow`       | `<number>`                                                                     | —     |
| `flex-shrink`     | `<number>`                                                                     | —     |
| `flex-basis`      | `<length>`                                                                     | —     |
| `flex-direction`  | `row`、`row-reverse`、`column`、`column-reverse`                                  | —     |
| `flex-wrap`       | `nowrap`、`wrap`、`wrap-reverse`                                                 | —     |
| `align-items`     | `stretch`、`center`、`flex-start`、`flex-end`、`baseline`                          | —     |
| `align-self`      | `stretch`、`center`、`flex-start`、`flex-end`、`baseline`、`auto`                   | —     |
| `align-content`   | `stretch`、`center`、`flex-start`、`flex-end`、`space-between`、`space-around`      | —     |
| `justify-content` | `flex-start`、`flex-end`、`center`、`space-between`、`space-around`、`space-evenly` | —     |
| `order`           | `<number>`                                                                     | —     |
| `gap`             | `<length-percentage>`                                                          | —     |
| `column-gap`      | `<length-percentage>`                                                          | —     |
| `row-gap`         | `<length-percentage>`                                                          | —     |

## Linear 布局

| 属性                      | 支持的值                                                                                                                                | 不支持的值 |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----- |
| `linear-orientation`    | `vertical`、`horizontal`、`vertical-reverse`、`horizontal-reverse`                                                                     | —     |
| `linear-cross-gravity`  | `none`、`start`、`end`、`center`、`stretch`                                                                                             | —     |
| `linear-weight-sum`     | `<number>`                                                                                                                          | —     |
| `linear-weight`         | `<number>`                                                                                                                          | —     |
| `linear-gravity`        | `none`、`top`、`bottom`、`left`、`right`、`center-vertical`、`center-horizontal`、`space-between`、`start`、`end`、`center`                   | —     |
| `linear-layout-gravity` | `none`、`top`、`bottom`、`left`、`right`、`center-vertical`、`center-horizontal`、`fill-vertical`、`fill-horizontal`、`start`、`end`、`center` | —     |
| `linear-direction`      | `与 linear-orientation 相同`                                                                                                           | —     |

## Grid 布局

| 属性                      | 支持的值                                    | 不支持的值                          |
| ----------------------- | --------------------------------------- | ------------------------------ |
| `grid-template-columns` | 支持（按属性语法使用）                             | —                              |
| `grid-template-rows`    | 支持（按属性语法使用）                             | —                              |
| `grid-auto-columns`     | 支持（按属性语法使用）                             | —                              |
| `grid-auto-rows`        | 支持（按属性语法使用）                             | —                              |
| `grid-column-span`      | —                                       | `已废弃；使用 grid-column-start/end` |
| `grid-row-span`         | —                                       | `已废弃；使用 grid-row-start/end`    |
| `grid-column-start`     | `<number>` 或 `span <number>`            | —                              |
| `grid-column-end`       | `<number>` 或 `span <number>`            | —                              |
| `grid-row-start`        | `<number>` 或 `span <number>`            | —                              |
| `grid-row-end`          | `<number>` 或 `span <number>`            | —                              |
| `grid-column-gap`       | `length`                                | —                              |
| `grid-row-gap`          | `length`                                | —                              |
| `justify-items`         | `auto`、`stretch`、`center`、`start`、`end` | —                              |
| `justify-self`          | `与 justify-items 相同`                    | —                              |
| `grid-auto-flow`        | 支持（按属性语法使用）                             | —                              |
| `grid-column`           | 支持（按属性语法使用）                             | —                              |
| `grid-row`              | 支持（按属性语法使用）                             | —                              |
| `grid-area`             | —                                       | `简写不支持`                        |

## 盒模型、背景与绘制

| 属性                           | 支持的值                                                                                 | 不支持的值          |
| ---------------------------- | ------------------------------------------------------------------------------------ | -------------- |
| `background-color`           | `hex`、`rgb`、`rgba`、`hsl`、`hsla`、`color name`                                         | —              |
| `border-left-color`          | `与 background-color 相同`                                                              | —              |
| `border-right-color`         | `与 background-color 相同`                                                              | —              |
| `border-top-color`           | `与 background-color 相同`                                                              | —              |
| `border-bottom-color`        | `与 background-color 相同`                                                              | —              |
| `border-radius`              | `<length-percentage>{1,4}`                                                           | —              |
| `border-top-left-radius`     | `<length-percentage>{1,2}`                                                           | —              |
| `border-bottom-left-radius`  | `与 border-top-left-radius 相同`                                                        | —              |
| `border-top-right-radius`    | `与 border-top-left-radius 相同`                                                        | —              |
| `border-bottom-right-radius` | `与 border-top-left-radius 相同`                                                        | —              |
| `border-width`               | `<length>`、`thin`、`medium`、`thick`                                                   | —              |
| `border-left-width`          | `与 border-width 相同`                                                                  | —              |
| `border-right-width`         | `与 border-width 相同`                                                                  | —              |
| `border-top-width`           | `与 border-width 相同`                                                                  | —              |
| `border-bottom-width`        | `与 border-width 相同`                                                                  | —              |
| `opacity`                    | `number [0,1]`                                                                       | —              |
| `padding`                    | `<length>{1,4}`                                                                      | —              |
| `padding-left`               | `<length>`                                                                           | —              |
| `padding-right`              | `<length>`                                                                           | —              |
| `padding-top`                | `<length>`                                                                           | —              |
| `padding-bottom`             | `<length>`                                                                           | —              |
| `margin`                     | `与 padding 相同`                                                                       | —              |
| `margin-left`                | `<length>`                                                                           | —              |
| `margin-right`               | `<length>`                                                                           | —              |
| `margin-top`                 | `<length>`                                                                           | —              |
| `margin-bottom`              | `<length>`                                                                           | —              |
| `background`                 | 支持（按属性语法使用）                                                                          | —              |
| `border-color`               | `与 background-color 相同`                                                              | —              |
| `border-style`               | `none`、`hidden`、`dotted`、`dashed`、`solid`、`double`、`groove`、`ridge`、`inset`、`outset` | —              |
| `box-shadow`                 | 支持（按属性语法使用）                                                                          | —              |
| `background-image`           | `<url()>`、`<gradient>`、`<linear-color-stop>`                                         | `<color-hint>` |
| `background-position`        | `length, 同 top {2}`、`center`、`top`、`left`、`bottom`                                   | —              |
| `background-origin`          | `padding-box`、`border-box`、`content-box`                                             | —              |
| `background-clip`            | `padding-box`、`border-box`、`content-box`、`border-area`                               | —              |
| `background-repeat`          | `repeat`、`no-repeat`、`repeat-x`、`repeat-y`、`space`、`round`                           | —              |
| `background-size`            | `cover`、`contain`、`auto`、`<length>`                                                  | —              |
| `border`                     | 支持（按属性语法使用）                                                                          | —              |
| `border-right`               | `与 border 相同`                                                                        | —              |
| `border-left`                | `与 border 相同`                                                                        | —              |
| `border-top`                 | `与 border 相同`                                                                        | —              |
| `border-bottom`              | `与 border 相同`                                                                        | —              |
| `border-left-style`          | `与 border-style 相同`                                                                  | —              |
| `border-right-style`         | `与 border-style 相同`                                                                  | —              |
| `border-top-style`           | `与 border-style 相同`                                                                  | —              |
| `border-bottom-style`        | `与 border-style 相同`                                                                  | —              |
| `outline`                    | 支持（按属性语法使用）                                                                          | —              |
| `outline-color`              | `与 background-color 相同`                                                              | —              |
| `outline-style`              | `与 border-style 相同`                                                                  | —              |
| `outline-width`              | `与 border-width 相同`                                                                  | —              |
| `margin-inline-start`        | `<length>`                                                                           | —              |
| `margin-inline-end`          | `<length>`                                                                           | —              |
| `padding-inline-start`       | `<length>`                                                                           | —              |
| `padding-inline-end`         | `<length>`                                                                           | —              |
| `border-inline-start-color`  | `与 background-color 相同`                                                              | —              |
| `border-inline-end-color`    | `与 background-color 相同`                                                              | —              |
| `border-inline-start-width`  | `与 border-width 相同`                                                                  | —              |
| `border-inline-end-width`    | `与 border-width 相同`                                                                  | —              |
| `border-inline-start-style`  | `与 border-style 相同`                                                                  | —              |
| `border-inline-end-style`    | `与 border-style 相同`                                                                  | —              |
| `border-start-start-radius`  | `与 border-radius 相同`                                                                 | —              |
| `border-end-start-radius`    | `与 border-radius 相同`                                                                 | —              |
| `border-start-end-radius`    | `与 border-radius 相同`                                                                 | —              |
| `border-end-end-radius`      | `与 border-radius 相同`                                                                 | —              |
| `filter`                     | `blur()`、`grayscale()`、`brightness()`、`contrast()`、`saturate()`；每条声明只支持一个函数          | 多个函数组合         |
| `clip-path`                  | 支持（按属性语法使用）                                                                          | —              |
| `mask-image`                 | 支持（按属性语法使用）                                                                          | —              |
| `mask`                       | `与 background 相同`                                                                    | —              |
| `mask-repeat`                | `与 background-repeat 相同`                                                             | —              |
| `mask-position`              | `与 background-position 相同`                                                           | —              |
| `mask-clip`                  | `与 background-clip 相同`                                                               | —              |
| `mask-origin`                | `与 background-origin 相同`                                                             | —              |
| `mask-size`                  | `与 background-size 相同`                                                               | —              |
| `image-rendering`            | `auto`、`crisp-edges`、`pixelated`                                                     | `smooth`       |

## 文本与字体

| 属性                               | 支持的值                                                        | 不支持的值    |
| -------------------------------- | ----------------------------------------------------------- | -------- |
| `color`                          | `与 background-color 相同`、`linear-gradient`、`radial-gradient` | —        |
| `text-overflow`                  | `与 overflow 相同`、`clip`、`ellipsis`                           | —        |
| `white-space`                    | `normal`、`nowrap`                                           | —        |
| `letter-spacing`                 | `<length>`                                                  | `normal` |
| `text-align`                     | `left`、`right`、`center`、`start`、`end`                       | —        |
| `line-height`                    | `<length>`、`number`、`normal`                                | —        |
| `font-size`                      | `<length>`                                                  | —        |
| `font-weight`                    | `normal`、`bold`、`<number> 100-700`                          | —        |
| `font-family`                    | 支持（按属性语法使用）                                                 | —        |
| `font-style`                     | `normal`、`italic`、`oblique`                                 | —        |
| `line-spacing`                   | `<length>`                                                  | —        |
| `text-decoration`                | `none`、`underline`、`line-through`                           | —        |
| `text-shadow`                    | `<length>{3} <color>`                                       | —        |
| `word-break`                     | `normal`、`break-all`、`keep-all`                             | —        |
| `text-decoration-color`          | `与 background-color 相同`                                     | —        |
| `text-indent`                    | `length`                                                    | —        |
| `text-stroke`                    | `length, color`                                             | —        |
| `text-stroke-color`              | `color`                                                     | —        |
| `text-stroke-width`              | `length`                                                    | —        |
| `-x-auto-font-size`              | 支持（按属性语法使用）                                                 | —        |
| `-x-auto-font-size-preset-sizes` | 支持（按属性语法使用）                                                 | —        |
| `caret-color`                    | —                                                           | `已废弃`    |
| `hyphens`                        | `none`、`auto`、`manual`                                      | —        |
| `font-variation-settings`        | `normal` 或一组 `<opentype-tag> <number>`                      | —        |
| `font-feature-settings`          | 支持（按属性语法使用）                                                 | —        |
| `font-optical-sizing`            | `none`、`auto`                                               | —        |
| `-x-auto-font-size-line-ranges`  | `line-range( <line-count>, <min-size> [, <max-size>]? )`    | —        |

## Transform、动画与过渡

Lynx 的 `transform-style` 只支持 `flat`，不支持 `preserve-3d`。子元素不会保留三维空间，不能依赖父子节点组成嵌套 3D 场景。

| 属性                                        | 支持的值                                                                                                                     | 不支持的值                    |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------ |
| `transform`                               | 支持（按属性语法使用）                                                                                                              | `scale3d()`、`rotate3d()` |
| `perspective`                             | 支持（按属性语法使用）                                                                                                              | —                        |
| `animation`                               | 支持（按属性语法使用）                                                                                                              | —                        |
| `animation-name`                          | `<string>`                                                                                                               | —                        |
| `animation-duration`                      | `<time>`                                                                                                                 | —                        |
| `animation-timing-function`               | `linear`、`ease`、`ease-in`、`ease-out`、`ease-in-out`、`cubic-bezier`、`square-bezier`、`step-start/step-end`、带方向参数的 `steps()` | 不带方向参数的 `steps()`        |
| `animation-delay`                         | `time, 同 animation-duration`                                                                                             | —                        |
| `animation-iteration-count`               | `<number>/infinite`                                                                                                      | —                        |
| `animation-direction`                     | `normal`、`alternate`、`reverse`、`alternate-reverse`                                                                       | —                        |
| `animation-fill-mode`                     | `none`、`forwards`、`backwards`、`both`                                                                                     | —                        |
| `animation-play-state`                    | `running`、`paused`                                                                                                       | —                        |
| `transform-origin`                        | 支持（按属性语法使用）                                                                                                              | —                        |
| `layout-animation-create-duration`        | `与 animation-duration 相同`                                                                                                | —                        |
| `layout-animation-create-timing-function` | `与 animation-timing-function 相同`                                                                                         | —                        |
| `layout-animation-create-delay`           | `与 animation-duration 相同`                                                                                                | —                        |
| `layout-animation-create-property`        | `opacity`、`scaleX`、`scaleY`、`scaleXY`                                                                                    | —                        |
| `layout-animation-delete-duration`        | `与 animation-duration 相同`                                                                                                | —                        |
| `layout-animation-delete-timing-function` | `与 animation-timing-function 相同`                                                                                         | —                        |
| `layout-animation-delete-delay`           | `与 animation-duration 相同`                                                                                                | —                        |
| `layout-animation-delete-property`        | `与 layout-animation-create-property 相同`                                                                                  | —                        |
| `layout-animation-update-duration`        | `与 animation-duration 相同`                                                                                                | —                        |
| `layout-animation-update-timing-function` | `与 animation-timing-function 相同`                                                                                         | —                        |
| `layout-animation-update-delay`           | `与 animation-duration 相同`                                                                                                | —                        |
| `transition`                              | `property duration timing-function delay`                                                                                | —                        |
| `transition-property`                     | `opacity`、`width`、`height`、`background-color`、`visibility`、`top`、`right`、`bottom`、`left`、`transform`、`all`、`none`        | —                        |
| `transition-duration`                     | `与 animation-duration 相同`                                                                                                | —                        |
| `transition-delay`                        | `与 animation-duration 相同`                                                                                                | —                        |
| `transition-timing-function`              | `与 animation-timing-function 相同`                                                                                         | —                        |
| `enter-transition-name(deprecated)`       | —                                                                                                                        | `已废弃`                    |
| `exit-transition-name(deprecated)`        | —                                                                                                                        | `已废弃`                    |
| `pause-transition-name(deprecated)`       | —                                                                                                                        | `已废弃`                    |
| `resume-transition-name(deprecated)`      | —                                                                                                                        | `已废弃`                    |
| `implicit-animation`                      | —                                                                                                                        | `已废弃`                    |
| `-x-animation-color-interpolation`        | `auto`、`sRGB`、`linearRGB`                                                                                                | —                        |
| `offset-distance`                         | `<number>`                                                                                                               | —                        |
| `offset-path`                             | `<basic-shape>`                                                                                                          | `url()`                  |
| `offset-rotate`                           | `auto`、`<angle>`                                                                                                         | `auto <angle>`、`reverse` |

## Lynx 扩展与其他

| 属性                    | 支持的值                  | 不支持的值            |
| --------------------- | --------------------- | ---------------- |
| `content`             | `括号字符串`               | —                |
| `cursor`              | —                     | `url(), keyword` |
| `list-main-axis-gap`  | 支持（按属性语法使用）           | —                |
| `list-cross-axis-gap` | 支持（按属性语法使用）           | —                |
| `adapt-font-size`     | —                     | `已废弃`            |
| `-x-app-region`       | —                     | `窗口区域范围 仅PC`     |
| `-x-handle-size`      | `<length-percentage>` | —                |
| `-x-handle-color`     | `<color>`             | —                |
