作者:boy31455349 | 来源:互联网 | 2023-02-01 14:54
您好,我将为我的div设置高度。
我尝试通过get window.innerHeight
此方法获得整个高度,但我无法访问div的孩子,我也尝试document.getElementById('masonryParent')
获得正确的结果,但如何访问div波纹管。有什么建议么?
this.setState({
width: window.innerWidth, height: window.innerHeight
});
1> guest..:
尝试这个
document.getElementById('masonryParent').children[0].style.height