angular.js - Using angular with angular-material cannot obtain the width and height of the card
仅有的幸福
仅有的幸福 2017-05-15 17:00:26
0
1
816


I set an instruction water-fall for the outermost p, and then wanted to get the md-card and offsetWidth of its sub-element offsetHeight, but the The values ​​are all 0, and the command code is as follows:


The results are as follows


And I have added width to each card in the style sheet,

I hope someone can help solve this problem, Crab.

仅有的幸福
仅有的幸福

reply all(1)
伊谢尔伦

As long as the page is rendered, its height will not change. It only has a min-height attribute. If the card is large, it will be stretched by the content inside

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template