一個css控制的特效

=======HTML========
<table width="100%" border="0" cellspacing="1" cellpadding="0">
  
<tr>
    
<td width="50%" valign="top">
    
<div style='height:300;overflow: auto;'>
    
<table width="100%" border="0" cellspacing="1" cellpadding="3">
    
<thead>
      
<tr align="center">
        
<th class="TdTitle_Blue">序號</th>
        
<th class="TdTitle_Blue">單位名稱</th>
        
<th class="TdTitle_Blue">編輯</th>
        
<th class="TdTitle_Blue">刪除</th>
      
</tr>
      
<thead>
      
<%
      
set conn=opendb("EMSC")
      sql
="SELECT * FROM mis_unit"
      
set rs=conn.execute(sql)
      
if not rs.eof then
        i
=1
        
while not rs.eof
          
if i mod 2 = 1 then
            className 
= "tdodd"
          
else
            className 
= "tdeven"
          
end if
      
%>
      
<tr>
        
<td align="center" class="<%=className%>"><%=i%></td>
        
<td  class="<%=className%>"><%=rs("unit")%></td>
        
<td align="center"  class="<%=className%>"><img src="Images/icon_edit.gif" alt="編輯" width="19" height="13" onClick="onEdit('<%=rs("unit")%>');" style="cursor:hand;"></td>
        
<td align="center"  class="<%=className%>"><img src="Images/icon_delete.gif" alt="刪除" width="15" height="15" onclick="onDelete('mas_unit_delete.asp?unit=<%=rs("unit")%>');" style="cursor:hand;"></td>
      
</tr>
      
<%
          rs.movenext
          i
=i+1
        
wend
      
else
      
%>
      
<tr><td colspan="4" align="center">抱歉,暫無資料.</td></tr>
      
<%
      
end if
      rs.close()
      conn.close()
      
%>
    
</table>
    
</div>
    
</td>
    
<td width="50%" valign="top"><table width="60%" border="0" align="center" cellpadding="3" cellspacing="0">
      
<tr>
        
<td colspan="2" class="TdTitle_Blue"><strong>新增/編輯單位</strong></td>
        
</tr>
        
<form name="frm" method="post" action="mas_unit_save.asp" onsubmit="return Checkinfo();">
      
<tr>
        
<td><div align="right">單位名稱:</div></td>
        
<td><input name="unit" type="text" class="misInput" id="unit"></td>
      
</tr>
      
<tr>
        
<td colspan="2"><div align="center">
          
<input name="oldUnit" type="hidden" value="">
          
<input name="Submit" type="submit" class="ButtonCom" value="新增">
          
&nbsp;
          
<input name="Submit2" type="reset" class="ButtonCom" value="重設">
        
</div></td>
        
</tr>
        
</form>
    
</table></td>
  
</tr>
</table>

====css======
<style>
  thead th, thead th.locked 
{
    background-color
: #6487dc;
    color
: #ffffff;
    position
:relative;
    cursor
: default;}
  thead th 
{
    top
: expression(this.parentElement.parentElement.parentElement.parentElement.scrollTop-2); 
    z-index
: 20;}
</style>
posted @ 2007-01-17 15:59  Athrun  阅读(208)  评论(0编辑  收藏  举报