Monday, 1 February 2021

TypeScript, Angular, Set element width height dynamically

 30rem => [style.width.rem]="30"

30px => [style.width.px]="30"
30% => [style.width.%]="30"
 [style.max-width.px]="child1.offsetWidth"
<div 
[style.width.px]="30"
/>


https://stackoverflow.com/questions/53353326/how-to-dynamically-set-max-width-of-sibling-in-angular
https://stackoverflow.com/questions/56484111/how-to-apply-style-with-percentage-in-angular

No comments:

Post a Comment