DEV Community

Cover image for Changing CSS with JavaScript
GiandoDev
GiandoDev

Posted on

Changing CSS with JavaScript

I use two ways to change the css via JS:

element.style.cssProperty = value

or

element.style.setProperty(cssProperty, value)

Alt Text

Top comments (1)

Collapse
 
thisdotmedia_staff profile image
This Dot Media

Thanks Giando 😊