层的位置

来源:互联网 发布:云计算和java哪个好 编辑:程序博客网 时间:2024/05/16 05:07

<center>

<table width="400" height="300" border="0" cellpadding="0" cellspacing="0">

<tr>

<td bgcolor="#CCCCCC"><span style="position:relative">

<div id="Layer1" style="position:absolute; width:200px; height:38px; z-index:1; background-color: #00FFFF; left: 11px; top: 0px; layer-background-color: #00FFFF; border: 1px none #000000;">这是应用了相对定位的</div>

</span></td>

</tr>

<tr>

<td bgcolor="#666666">

<div id="Layer2" style="position:absolute; width:200px; height:38px; z-index:1; background-color: #00FF00; left: 200px; top: 175px; layer-background-color: #00FF00; border: 1px none #000000;">这是没有应用的</div>

</td>

</tr>

</table>

</center>

原创粉丝点击