我有一个表格,当我将鼠标移到这个单元格上时,背景和字体颜色应该会改变,然后在mouseOut时又会改变回来,但由于某些原因,我似乎无法让字体改变颜色。我用的是asp经典版和internet explorer 8。
<TH <%if boolHighlight=false then %>onMouseOver="this.bgColor='#E3E31B'; this.style.color='#ffffff';" onMouseOut="this.bgColor='#FFFFFF'; this.style.color='#000000';" <%end if%>style="width: 9%; cursor: hand; border-right: none; align: center; vertical-align: center;"
title="Click to get info">
<font color="navy"><%= RS("ROLL_ID")%></font>
</TH>发布于 2013-06-28 03:17:36
在ASP文件中
<%
thClass = IIf(boolHighlight, "hl", "")
%>
<!-- later... -->
<th class="info <%=thClass%>" title="Click to get info"><%=RS("ROLL_ID")%></th>在CSS文件中
th.info {
color: navy;
background-color: white;
}
th.info.hl:hover {
color: #ffffff;
background-color: #E3E31B;
}备注
:hover就是为此而生的。https://stackoverflow.com/questions/17350907
复制相似问题