有没有办法返回已设置为auto的元素的高度?当我调用$("#element")时,我得到0.高度();
这是jquery代码.所述img.height()返回0因此,最终结果是关闭的.
img.css({top: (img.parent().height() - img.height()) /2, left: (img.parent().outerWidth() - img.outerWidth()) / 2});
Run Code Online (Sandbox Code Playgroud)
HTML看起来像这样:
<div id="exploreImage" class="virtual-room-large" style="width: 288px; height: auto; top: 185px; left: 89px; ">
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
32374 次 |
| 最近记录: |