鼠标移上去层上的文字就变清晰,鼠标移开字就模糊 onmouseover,对层上的文字进行样式控制 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 手头上有个图片半透明的,仅供参考<script> function high(image) { obj=image if(window.lowlighting) clearInterval(lowlighting) highlighting=setInterval("highlightit(obj)",100) } function low(image) { obj=image if(window.highlighting) clearInterval(highlighting) lowlighting=setInterval("lowlightit(obj)",100) } function highlightit(cur) { if (cur.filters.alpha.opacity <100) cur.filters.alpha.opacity+=5 else if(window.highlighting) clearInterval(highlighting) } function lowlightit(cur) { if (cur.filters.alpha.opacity>20) cur.filters.alpha.opacity-=5 else if(window.lowlighting) clearInterval(lowlighting) } </script> <div align="center"> <a onclick="window.fullscreen=yes"> <img src="000.jpg" border="0" style="filter:alpha(opacity=40)" onMouseover="high(this)" onMouseout="low(this)"/> </a> </div> 模糊这种效果可以用图片替换来实现的,至于事件,可以用onmouseover和onmouseout 这样就挺好的:<div style="color:#EEEEEE; width:110px" onMouseOver="this.style.color='#111111'" onMouseOut="this.style.color='#EEEEEE'">鼠标移到这里试试</div> 看了大家的回复,我觉得用onmouseover和onmouseout来控制表格(请注意,是表格,不是曾)背景和文字样式比较方便。这样不必做2个不同的层或者图片了。请大家给出代码:鼠标移上去,层内表格的背景颜色和文字颜色变化,鼠标移开,背景颜色和文字颜色恢复原状。 可以的,像这样<div style="color:#EEEEEE; background-color:#EEEEEE; width:110px" onMouseOver="this.style.color='#000000'; this.style.backgroundColor='#FFFFFF';" onMouseOut="this.style.color='#EEEEEE'; this.style.backgroundColor='#EEEEEE';">鼠标移到这里试试 </div> <div style="color:#EEEEEE; width:110px" onMouseOver="this.style.color='#111111'" onMouseOut="this.style.color='#EEEEEE'">鼠标移到这里试试 </div> <style>.mm{color:#111;background:#fff;text-decoration:none;}.mm:hover{color:#eee;background:#111;text-decoration:none;}</style><a class="mm" href="#">鼠标移到这里试试1<a><a class="mm" href="#">鼠标移到这里试试2<a><a class="mm" href="#">鼠标移到这里试试3<a><a class="mm" href="#">鼠标移到这里试试4<a><div class="mm">鼠标移到这里试试5</div><div class="mm">鼠标移到这里试试6</div><div class="mm">鼠标移到这里试试7</div> IE6也可以这么用啊<style>.mm{color:#111;background:#fff;}.mm a{text-decoration:none;}.mm a:hover{color:#eee;background:#111;text-decoration:none; display:block;}</style><table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="mm"><a href="#">鼠标移到这里试试<a></td> </tr></table> 这个方法就是不用事件的<style>.mm{color:#111;background:#fff;}.mm a{text-decoration:none;}.mm a:hover{color:#eee;background:#111;text-decoration:none; display:block;}</style><table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="mm"><a href="javascript:">鼠标移到这里试试<a></td> </tr></table> <style>.mm{color:#111;background:#fff;}.mm a{text-decoration:none;color:#111;}.mm a:hover{color:#eee;background:#111;text-decoration:none; display:block;}</style><table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="mm"><a href="javascript:">鼠标移到这里试试<a></td> </tr></table>根据自己的需求改里面的颜色 IE6下 只有带href属性a标签才行 IE7以上还有其他的浏览器不管什么标签都可以 去掉 空格 换行 uploadify求助 请教表单提交后页面编码改变出现乱码的问题 请问这个怎么处理?麻烦帮帮忙。 submit后, 在服务器处理完毕前, 怎末限制用户执行任何操作? 两个方本框,只有其中一个不能为空,如果验证不通过,则通能在这两文件框上移动 js能连接这样分布的sql server数据库吗? 请高手帮忙,这个代码可否改成从上往下显示!急! 关于onmouseover的一个小问题 请问javascript怎么取得月份的简称啊? 鼠标悬停表格可见,鼠标移开表格隐藏 html 中 label取值
{
obj=image
if(window.lowlighting) clearInterval(lowlighting)
highlighting=setInterval("highlightit(obj)",100)
}
function low(image)
{
obj=image
if(window.highlighting) clearInterval(highlighting)
lowlighting=setInterval("lowlightit(obj)",100)
}
function highlightit(cur)
{
if (cur.filters.alpha.opacity <100)
cur.filters.alpha.opacity+=5
else if(window.highlighting)
clearInterval(highlighting)
}
function lowlightit(cur)
{
if (cur.filters.alpha.opacity>20)
cur.filters.alpha.opacity-=5
else if(window.lowlighting)
clearInterval(lowlighting)
} </script>
<div align="center">
<a onclick="window.fullscreen=yes"> <img src="000.jpg" border="0" style="filter:alpha(opacity=40)" onMouseover="high(this)" onMouseout="low(this)"/> </a>
</div>
<div style="color:#EEEEEE; width:110px" onMouseOver="this.style.color='#111111'" onMouseOut="this.style.color='#EEEEEE'">鼠标移到这里试试</div>
<div style="color:#EEEEEE; background-color:#EEEEEE; width:110px" onMouseOver="this.style.color='#000000'; this.style.backgroundColor='#FFFFFF';" onMouseOut="this.style.color='#EEEEEE'; this.style.backgroundColor='#EEEEEE';">鼠标移到这里试试 </div>
<div style="color:#EEEEEE; width:110px" onMouseOver="this.style.color='#111111'" onMouseOut="this.style.color='#EEEEEE'">鼠标移到这里试试 </div>
.mm{color:#111;background:#fff;text-decoration:none;}
.mm:hover{color:#eee;background:#111;text-decoration:none;}
</style>
<a class="mm" href="#">鼠标移到这里试试1<a>
<a class="mm" href="#">鼠标移到这里试试2<a>
<a class="mm" href="#">鼠标移到这里试试3<a>
<a class="mm" href="#">鼠标移到这里试试4<a>
<div class="mm">鼠标移到这里试试5</div>
<div class="mm">鼠标移到这里试试6</div>
<div class="mm">鼠标移到这里试试7</div>
.mm{color:#111;background:#fff;}
.mm a{text-decoration:none;}
.mm a:hover{color:#eee;background:#111;text-decoration:none; display:block;}
</style><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="mm"><a href="#">鼠标移到这里试试<a></td>
</tr>
</table>
.mm{color:#111;background:#fff;}
.mm a{text-decoration:none;}
.mm a:hover{color:#eee;background:#111;text-decoration:none; display:block;}
</style><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="mm"><a href="javascript:">鼠标移到这里试试<a></td>
</tr>
</table>
.mm{color:#111;background:#fff;}
.mm a{text-decoration:none;color:#111;}
.mm a:hover{color:#eee;background:#111;text-decoration:none; display:block;}
</style><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="mm"><a href="javascript:">鼠标移到这里试试<a></td>
</tr>
</table>根据自己的需求改里面的颜色