javascript set multiple css properties code example
Example 1: setting multiple styles in javascript
document.getElementById("myElement").style.cssText = "display: block; position: absolute";
Example 2: set multiple attributes css javascript
document.getElementById("myElement").style.cssText = "display: block; position: absolute";
Example 3: how to add multiple styles in javascript
Object.assign(yourelement.style,{fontsize:"12px",left:"200px",top:"100px"});