前端基础JavascriptDOMCSSRule对象[cssText](https://developer.mozilla.org/zh-CN/docs/Web/API/CSSRule/cssText)On this pagecssText概述cssText 返回样式规则所包含的实际文本.想要能够动态的设置一个样式表规则,查看使用动态样式信息.语法string = cssRule.cssText;例子<style> body { background-color: darkblue; }</style><script> var stylesheet = document.styleSheets[0]; alert(stylesheet.cssRules[0].cssText); // body { background-color: darkblue; }</script>