Answers for "javscript change multile styles at once"

CSS
1

setting multiple styles in javascript

document.getElementById("myElement").style.cssText = "display: block; position: absolute";
Posted by: Guest on November-07-2020
0

how to add multiple styles in javascript

Object.assign(yourelement.style,{fontsize:"12px",left:"200px",top:"100px"});
Posted by: Guest on September-02-2020

Code answers related to "javscript change multile styles at once"

Browse Popular Code Answers by Language