鼠标移上去层上的文字就变清晰,鼠标移开字就模糊 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以上还有其他的浏览器不管什么标签都可以 请教帐号登录的问题 url上获取json对象问题 导致页面变慢的原因都有哪些呢? onunload用法 匹配一个或多个英文字符的正则怎么写 在线急等,事小分多啊,名位帮帮忙 鼠标移到表格的某一行时如何让它触发一个事件?(急!) 为啥ctrl+enter提交不了?急! index.asp页中JavaScript脚本不能执行,改名成index.htm却能执行 一个小问题,需要你的帮助!多指教! 鼠标悬停表格可见,鼠标移开表格隐藏 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>根据自己的需求改里面的颜色