我的HTML页面中有一个div。我正在根据某种条件显示此div,但是div显示在指向鼠标光标的HTML元素后面。
我已经尝试了0-999999之间z-index的所有值。有人可以告诉我为什么会这样吗?
CSS的Z-INDEX属性是否有最小值或最大值?
.divClass {
position: absolute;
left: 25px;
top: 25px;
width: 320px;
height: 300px;
z-index: 1000;
}
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>
<asp:HyperLink ID="lnkProgram" runat="server"></asp:HyperLink>
</td>
</tr>
<tr>
<td>
<div class="divClass">
Some Data
</div>
</td>
</tr>
</table>
我正在.divClass
通过<asp:hyperlink>
使用jQuery 通过onclick 显示和隐藏div 。
While
INT_MAX
is probably the safest bet, WebKit apparently uses doubles internally and thus allows very large numbers (to a certain precision).LLONG_MAX
e.g. works fine (at least in 64-Bit Chromium and WebkitGTK), but will be rounded to 9223372036854776000.(Although you should consider carefully whether you really, really need this many z indices…).