onmouseover,对层上的文字进行样式控制 

解决方案 »

  1.   

    手头上有个图片半透明的,仅供参考<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>
      

  2.   

    模糊这种效果可以用图片替换来实现的,至于事件,可以用onmouseover和onmouseout
      

  3.   

    这样就挺好的:
    <div style="color:#EEEEEE; width:110px" onMouseOver="this.style.color='#111111'" onMouseOut="this.style.color='#EEEEEE'">鼠标移到这里试试</div>
      

  4.   

    看了大家的回复,我觉得用onmouseover和onmouseout来控制表格(请注意,是表格,不是曾)背景和文字样式比较方便。这样不必做2个不同的层或者图片了。请大家给出代码:鼠标移上去,层内表格的背景颜色和文字颜色变化,鼠标移开,背景颜色和文字颜色恢复原状。
      

  5.   

    可以的,像这样
    <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>
      

  6.   


    <div style="color:#EEEEEE; width:110px" onMouseOver="this.style.color='#111111'" onMouseOut="this.style.color='#EEEEEE'">鼠标移到这里试试 </div>
      

  7.   

    <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>
      

  8.   

    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>
      

  9.   

    这个方法就是不用事件的<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>
      

  10.   

    <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>根据自己的需求改里面的颜色
      

  11.   

    IE6下 只有带href属性a标签才行 IE7以上还有其他的浏览器不管什么标签都可以