Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to add multiple css style in javascript

document.getElementById("myElement").style.cssText = "display: block; position: absolute";

//use template literals
document.getElementById("myElement").style.cssText = `
  display: block; 
  position: absolute;
`;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #multiple #css #style #javascript
ADD COMMENT
Topic
Name
2+8 =