DEV Community

Cover image for Changing CSS with JavaScript
GiandoDev
GiandoDev

Posted on

2

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 😊

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️