TShopping

 找回密碼
 註冊
搜索
查看: 1856|回復: 1
打印 上一主題 下一主題

[教學] 提示選單效果

[複製鏈接]
跳轉到指定樓層
1#
發表於 2008-9-23 20:53:31 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
 
Push to Facebook
控制碼內容:
一 將下面複製至 <head> 區內
  1. <!------------ 插入控制碼區段開始 ------------>
  2. <style>
  3. .menulines{
  4. border:2px solid white;
  5. }

  6. .menulines a{
  7. text-decoration:none;
  8. color:#000000;
  9. }
  10. </style>

  11. <script language="JavaScript1.2">

  12. /*
  13. Highlight menu effect script: By Dynamicdrive.com
  14. For full source, Terms of service, and 100s DTHML scripts
  15. Visit http://www.dynamicdrive.com
  16. */

  17. function borderize(what,color){
  18. what.style.borderColor=color
  19. }

  20. function borderize_on(e){
  21. if (document.all)
  22. source3=event.srcElement
  23. else if (document.getElementById)
  24. source3=e.target
  25. if (source3.className=="menulines"){
  26. borderize(source3,"black")
  27. }
  28. else{
  29. while(source3.tagName!="TABLE"){
  30. source3=document.getElementById? source3.parentNode : source3.parentElement
  31. if (source3.className=="menulines")
  32. borderize(source3,"black")
  33. }
  34. }
  35. }

  36. function borderize_off(e){
  37. if (document.all)
  38. source4=event.srcElement
  39. else if (document.getElementById)
  40. source4=e.target
  41. if (source4.className=="menulines")
  42. borderize(source4,"white")
  43. else{
  44. while(source4.tagName!="TABLE"){
  45. source4=document.getElementById? source4.parentNode : source4.parentElement
  46. if (source4.className=="menulines")
  47. borderize(source4,"white")
  48. }
  49. }
  50. }

  51. </script>
  52. <!------------ 插入控制碼區段結束 ------------>
複製代碼

border:2px solid white;
指定提示邊框顯示寬度
color:#000000;
指定按鈕文字顯示顏色

二 將下面複製至 <body> 標籤後
  1. <!------------ 插入控制碼區段開始 ------------>
  2. <table border="0" width="120" cellspacing="2" cellpadding="1" onMouseover="borderize_on(event)" onMouseout="borderize_off(event)">
  3. <tr><td width="100%" bgcolor="#64D0FE"><font size="3"><b>Main Menu</b></font></td></tr>
  4. <tr><td width="100%" class="menulines"><font size="2"><a href="#.htm">※ 教 學 快 報 ※</a> </font></td></tr>
  5. <tr><td width="100%" class="menulines"><font size="2"><a href="#.htm">※ 軟 體 下 載 ※</a> </font></td></tr>
  6. <tr><td width="100%" class="menulines"><font size="2"><a href="#.htm">※ 免 費 資 源 ※</a> </font></td></tr>
  7. <tr><td width="100%" class="menulines"><font size="2"><a href="#.htm">※ 背 景 音 樂 ※</a></font></td></tr>
  8. <tr><td width="100%" class="menulines"><font size="2"><a href="#.htm">※ 本 站 首 頁 ※</a> </font></td></tr>
  9. </table>
  10. <!------------ 插入控制碼區段結束 ------------>
複製代碼

width="120"
指定選單的顯示寬度
bgcolor="#64D0FE"
指定選單表頭的背景顏色

 

臉書網友討論
2#
發表於 2013-11-14 00:16:43 | 只看該作者
好睏啊  

版主招募中

*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-25 08:31 , Processed in 0.085029 second(s), 19 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表