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, and this page is available as Markdown at /apps-plugin/docs/client-framework/css-capabilities.md.

CSS 能力清单

开发样式时,先通过本页确认 CSS 属性和取值是否可用。本页列出豆包应用插件当前文档承诺的 CSS 能力范围;需要进一步理解布局、选择器、文本承载和动画等行为差异时,再阅读样式与布局差异。豆包应用插件使用 Lynx 作为 UI 渲染器,其 CSS 能力不等同于浏览器的完整 CSS 规范。

判断规则:

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

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

注意

  • 本清单只说明样式属性和值,选择器、节点、文本承载和布局行为请阅读样式与布局差异;
  • 即使某个属性受支持,也应在真实目标端检查文本测量、滚动、层叠和动画效果;
  • 关键容器应显式声明布局、尺寸和盒模型,不依赖 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-3dLynx 仅按 flat 渲染,不要依赖父子节点组成嵌套 3D 场景

单位与尺寸

属性支持的值不支持的值
长度单位auto、%、px、rpx、rem、em、vh、vw、ppx、calc()、fit-content、max-contentenv()、ch、ex、cm、mm、in、pt、pc、min-content
top<length>—
left<length>—
right<length>—
bottom<length>—
box-sizingborder-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>—

显示、定位与滚动

属性支持的值不支持的值
positionrelative、absolute、fixed、stickystatic
displayflex、none、linear、gridblock、inline、inline-block、table*
overflowvisible、hiddenscroll
overflow-y与 overflow 相同—
visibilityvisible、hidden—
vertical-align支持(按属性语法使用)—
directionnormal、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-directionrow、row-reverse、column、column-reverse—
flex-wrapnowrap、wrap、wrap-reverse—
align-itemsstretch、center、flex-start、flex-end、baseline—
align-selfstretch、center、flex-start、flex-end、baseline、auto—
align-contentstretch、center、flex-start、flex-end、space-between、space-around—
justify-contentflex-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-orientationvertical、horizontal、vertical-reverse、horizontal-reverse—
linear-cross-gravitynone、start、end、center、stretch—
linear-weight-sum<number>—
linear-weight<number>—
linear-gravitynone、top、bottom、left、right、center-vertical、center-horizontal、space-between、start、end、center—
linear-layout-gravitynone、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-gaplength—
grid-row-gaplength—
justify-itemsauto、stretch、center、start、end—
justify-self与 justify-items 相同—
grid-auto-flow支持(按属性语法使用)—
grid-column支持(按属性语法使用)—
grid-row支持(按属性语法使用)—
grid-area—简写不支持

盒模型、背景与绘制

属性支持的值不支持的值
background-colorhex、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 相同—
opacitynumber [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-stylenone、hidden、dotted、dashed、solid、double、groove、ridge、inset、outset—
box-shadow支持(按属性语法使用)—
background-image<url()>、<gradient>、<linear-color-stop><color-hint>
background-positionlength, 同 top {2}、center、top、left、bottom—
background-originpadding-box、border-box、content-box—
background-clippadding-box、border-box、content-box、border-area—
background-repeatrepeat、no-repeat、repeat-x、repeat-y、space、round—
background-sizecover、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 相同—
filterblur()、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-renderingauto、crisp-edges、pixelatedsmooth

文本与字体

属性支持的值不支持的值
color与 background-color 相同、linear-gradient、radial-gradient—
text-overflow与 overflow 相同、clip、ellipsis—
white-spacenormal、nowrap—
letter-spacing<length>normal
text-alignleft、right、center、start、end—
line-height<length>、number、normal—
font-size<length>—
font-weightnormal、bold、<number> 100-700—
font-family支持(按属性语法使用)—
font-stylenormal、italic、oblique—
line-spacing<length>—
text-decorationnone、underline、line-through—
text-shadow<length>{3} <color>—
word-breaknormal、break-all、keep-all—
text-decoration-color与 background-color 相同—
text-indentlength—
text-strokelength, color—
text-stroke-colorcolor—
text-stroke-widthlength—
-x-auto-font-size支持(按属性语法使用)—
-x-auto-font-size-preset-sizes支持(按属性语法使用)—
caret-color—已废弃
hyphensnone、auto、manual—
font-variation-settingsnormal 或一组 <opentype-tag> <number>—
font-feature-settings支持(按属性语法使用)—
font-optical-sizingnone、auto—
-x-auto-font-size-line-rangesline-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-functionlinear、ease、ease-in、ease-out、ease-in-out、cubic-bezier、square-bezier、step-start/step-end、带方向参数的 steps()不带方向参数的 steps()
animation-delaytime, 同 animation-duration—
animation-iteration-count<number>/infinite—
animation-directionnormal、alternate、reverse、alternate-reverse—
animation-fill-modenone、forwards、backwards、both—
animation-play-staterunning、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-propertyopacity、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 相同—
transitionproperty duration timing-function delay—
transition-propertyopacity、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-interpolationauto、sRGB、linearRGB—
offset-distance<number>—
offset-path<basic-shape>url()
offset-rotateauto、<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>—