How can I get CSS properties of an child element of a node?
I want to get the height of the <li>
element of a <ul>
style.scss
ul.menu {
width: 100%;
float: left;
li {
height: 28px;
}
}
javascript
let elementList = this.dropdownMenu.nativeElement.children;
console.log(elementList.length);
console.log(/*height of li*/);
I prefer solutions with vanilla JavaScript without using jQuery!