cssText – Add Multiple Styles Using JavaScript

CSS

cssText – Adding multiple styles to an element with vanilla JavaScript can feel a bit clunky. The most common approach I’ve seen to style elements with plain JavaScript is to grab your target element, and then add one style at a time. Example: It works, but it’s boring, there’s too much repetition, and you are …

cssText – Add Multiple Styles Using JavaScript Read More »