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 😊

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay