阴影链接

  1. <html>
  2. <head>
  3. <style>
  4. a
  5. {
  6. color:black;
  7. height:25;
  8. font:bold;
  9. text-decoration:none;
  10. }
  11. </style>
  12. <script type="text/javascript">
  13. var i
  14. function dropshadow()
  15. {
  16. i=0
  17. interval=setInterval("makedropshadow(myLink)",10)
  18. }
  19.  
  20. function back()
  21. {
  22. clearInterval(interval)
  23. document.getElementById('myLink').style.filter=false
  24. }
  25.  
  26. function makedropshadow()
  27. {
  28. i++
  29. if (i<7)
  30. {
  31. document.getElementById('myLink').style.filter="dropshadow(offx=" + i + ")"
  32. document.getElementById('myLink').style.filter="dropshadow(offy=" + i + ")"
  33. }
  34. else if (window.interval)
  35. {
  36. clearInterval(interval)
  37. }
  38. }
  39. </script>
  40. </head>
  41.  
  42. <body>
  43. <a href="/index.html" id="myLink" onmouseover="dropshadow()" onmouseout="back()">请把鼠标移动到链接上</a>
  44. </body>
  45.  
  46. </html>