前端基础JavascriptDOMCSSStyleDeclaration对象[cssText](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/cssText)On this pagecssText接口的 cssText 属性只 CSSStyleDeclaration 返回或设置元素的内联样式声明的文本。不要与样式表 style-rule 混淆 CSSRule.cssText。例子<span id="s1" style="color: red;"> Some text </span><script> var elem = document.getElementById("s1"); alert(elem.style.cssText); // "color: red;"</script>