Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Set CSS styles with javascript

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