CodeAPI

StyleMixin

Provides functionality for elements that can be styled.

Table of Contents

PROPERTIES

?
Store values associated with an object.
styleGets an object containing information about the element's styles.

style

Gets an object containing information about the element's styles.

Syntax

get style(): Style
TYPE
?
The kind of data the property stores.

Examples

Set the background color

$w("#myElement").style.backgroundColor = "rgba(255,0,0,0.5)";

Get the background color

let bgColor = $w("#myElement").style.backgroundColor;