<img border="0" src="images/spin_down_keyon.gif" width="17" height="7" onMouseDown="this.src='images/spin_down_keydown.gif'" onMouseUp="this.src='images/spin_down_keyon.gif'" alt="递减">还可以用CSS实现,代码不记得了,自己搜索

解决方案 »

  1.   

    <html>
    <head><title> +--沙虫工作室--+ </title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    <!--
    function down(){
    document.all.button1.style.borderTop="0px #cccccc"
    document.all.button1.style.borderRight="0px #cccccc"
    document.all.button1.style.borderBottom="0px #cccccc"
    document.all.button1.style.borderLeft="0px #cccccc"
    }
    function up(){
    document.all.button1.style.borderTop="1px solid #ffffff"
    document.all.button1.style.borderRight="1px solid #000000"
    document.all.button1.style.borderBottom="1px solid #000000"
    document.all.button1.style.borderLeft="1px solid #ffffff"
    }
    //-->
    </script>
    <link rel="stylesheet" href="" type="text/css">
    </head><body bgcolor="#cccccc">
    <div id="button1" style="width:93 px;height:93 px;border-top:1px solid #ffffff;border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:1px solid #ffffff;"><a href="####" onmousedown="down()" onmouseup="up()"><img id="img1" src="button.gif" width="92" height="92" border="0" alt=""></a></div>
    </body>
    </html>
      

  2.   

    工具栏的效果是:1.平时灰色的,而且是平的2.鼠标移上去的时候是彩色,而且凸出3.鼠标按下去的时候是彩色,而且凹进4.鼠标离开则恢复原状你需要设置三个CSS的“属性类”(用class引用的那个,比如 .myfont)第一个,把图像设置成灰度的(用滤镜)第二个,给图像加边,左边和上边用 白色,右边和下边用 深灰色,宽度1第三个,给图像加边,左边和上边用 深灰,右边和下边用白色,宽度1然后设置鼠标事件……赋予不同的className6