DEV Community

loading...
Cover image for Changing CSS with JavaScript

Changing CSS with JavaScript

GiandoDev
⭐️⭐️⭐️⭐️⭐️
・1 min read

I use two ways to change the css via JS:

element.style.cssProperty = value

or

element.style.setProperty(cssProperty, value)

Alt Text

Discussion (1)

Collapse
thisdotmedia_staff profile image
This Dot Media

Thanks Giando 😊