Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Set CSS styles with javascript

var style = document.createElement('style');
  document.head.appendChild(style);
  style.sheet.insertRule('#target {color: darkseagreen}');
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #Set #CSS #styles #javascript
ADD COMMENT
Topic
Name
5+8 =