Search.../

style

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

Description

The following styles can be used with boxes:

Note: Not all styles can be used on all box designs. To determine which styles work with a specific box design, go to the Box Design panel in the Editor, choose a design, and click Customize Design. The design options that you see in the Box Design panel for your particular box are the styles you can use in your code.

Type:

StyleRead Only

Was this helpful?

Set the background color

Copy Code
1$w("#myElement").style.backgroundColor = "rgba(255,0,0,0.5)";
Get the background color

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