Please consider the below snippet. i need to set multiple CSS properties in typescript. for that i have tried the below code.
public static setStyleAttribute(ele
I hope this helps you or someone else...
You can achieve this using a HTLMDivElement
and the CSSStyleDeclaration
contained within it. eg.
var container: HTMLDivElement;
container.style.color = "red";
container.style.fontSize = "12px";
container.style.marginTop = "5px";
This also applies to other classes that inherit from HTMLElement
and have a style
property (for example HTMLBodyElement
.