Web APIs

CSS Object Model (CSSOM)

Checking compatibility...

Programmatically create, modify and manage CSS stylesheets and rules. Manipulate styles, create dynamic animations, and handle complex style updates.

Stylesheet Management

This example shows how to create new stylesheets from scratch and add CSS rules to them, giving you a way to organize and apply styles to your page dynamically.

=
=
=
=
=
=

Output

Click Run to see output...

Style Manipulation

This example demonstrates how to read the actual styles applied to an element and change them on the fly, letting you create interactive visual effects based on user actions.

=
=
=
=
=
=

Output

Click Run to see output...

Dynamic Rules

This example shows how to create custom animations with randomized properties that can be applied to any element, all without writing any CSS files.

=
=
=
=
=
=

Output

Click Run to see output...