Self ng.Element.set_style (String property, Mixed value) vs. 1.1.0 Full+Lite

Sets a CSS property (including tranformation) for the HTML Element.

Parameters

String property Required vs. 1.1.0 Full+Lite
The CSS property name. This should be either in a camel case or hyphenated format.
Special Values:
  • opacity: set the element's opacity based on percentage (value must be between 0 to 100)
  • zoom: set the element's zoom level. based on percentage (e.g. value should be 50 instead of 0.5).
  • scrolltop: set the scroll top position.
  • scrollleft: set the scroll left position.
  • transform-...: set the CSS transform properties. The property must include the "transform-" followed by the function. For example, transform-rotate or transform-skewX. See ng.Element.set_transform(prop, val) for more details
Mixed value Required vs. 1.1.0 Full+Lite
The CSS value. This can be a string, number or an ng.Color object.

Return

Self Required vs. 1.1.0 Full+Lite
The original HTML Element.

Examples

Using ng.Element.set_style(property, value)
Demo:
This is a div

API Menu