diff --git a/packages/taro-runtime/src/dom/style.ts b/packages/taro-runtime/src/dom/style.ts index 1898b39ef960..c24550468a39 100644 --- a/packages/taro-runtime/src/dom/style.ts +++ b/packages/taro-runtime/src/dom/style.ts @@ -115,7 +115,8 @@ export class Style { } public setProperty (propertyName: string, value?: string | null) { - if (isCssVariable(propertyName)) { + if (propertyName[0] === '-') { + // 支持 webkit 属性或 css 变量 this.setCssVariables(propertyName) } else { propertyName = toCamelCase(propertyName)