【发布时间】:2014-01-29 06:13:06
【问题描述】:
我有这个 HTML 代码:
<div id="maininner" class="grid-box" style="min-height: 2500px;">
我想知道如何检索min-height 属性,将某个值减去当前值并在属性中重新加载新值。
这是怎么做到的?
我没有尝试过任何东西,因为我对 JavaScript / jQuery 完全陌生,我相信从我在互联网上搜索的内容来看是最可行的选择。
就我所见,有一个 jQuery 方法,它是 .attr(),它可以满足我的需要。
谢谢。
【问题讨论】:
-
仅供参考,
min-height不是属性,而是 CSS 属性 -
_subtract a certain value to the current value and reload the new value in the attribute._你为什么要这个?
标签: javascript jquery html css styles