I know this question has been answered but I still need help for my specific situation
我
<ul>
<li>blah blah</li>
<li>blah blah blah</li>
</ul>
我 managed to insert a div after each li using
$( <div class="shadow-hide"></div> ) .appendTo( div#main nav.left ul li );
因此,现在有html。
<ul>
<li>blah blah</li>
<div class= shadow-hide ></div>
<li>blah blah blah</li>
<div class= shadow-hide ></div>
</ul>
,但我如何确定四舍五入的高度,以达到其面前的高度?
我迄今在座,但我猜测,这只是第一点的高峰:
$( <div class="shadow-hide"></div> ) .appendTo( div#main nav.left ul li );
var liHeight = $("div#main nav.left ul li").height();
$( div.shadow-hide ).css( height , liHeight);