我有一个使用纳米滚动条的指令,它应该有一些固定的高度。 的结构是这样的:检查父母div是否有高度
<div id="parent_div">
<my-custom-directive>
<div>...</div>
<div id="div_required_to_have_fixed_height">...</div>
</my-custom-directive>
</div>
我想有在DIV一些固定的高度与ID- div_required_to_have_fixed_height。样式高度参数可以在第一个div处提供,编号为 - parent_div。 因此,在格div_required_to_have_fixed_height,我要检查,如果出现在母公司层面的高度,然后使用以其他方式使用高度:500像素
反正有没有做到这一点使用角/ CSS。
你可以选择使用jQuery'$( '#div_required_to_have_fixed_height')最接近( '#parent_div')的CSS('高度固定高度的div的父母heigth。 ')' –
不能使用这个,因为在我的自定义指令有没有父母div id的信息 – Anita