A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/cssom/CSSStyleDeclaration/cssText below:

cssText ยท WebPlatform Docs

cssText Summary

Gets or sets the textual representation of a CSS style declaration.

Property of css/cssom/CSSStyleDeclaration/CSSStyleDeclarationcss/cssom/CSSStyleDeclaration/CSSStyleDeclaration

Syntax
var declarationText = declaration.cssText;
declaration.cssText = declarationText;
Return Value

Returns an object of type StringString

The textual representation of the CSS style declaration.

Examples
<style>
body { background-color: darkblue; }
</style>
<script>
  var stylesheet = document.styleSheets[0];
  alert(stylesheet.cssRules[0].cssText);
  // returns "body { background-color: darkblue; }"
</script>
Notes

This property reflects the current state of the declaration and not its initial value.

Related specifications
DOM Level 2 Style
Recommendation

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4