找回密碼
 註冊
搜索
查看: 6197|回復: 1

CSS控制 隱藏 & 顯示

[複製鏈接]
發表於 2005-12-26 13:53:55 | 顯示全部樓層 |閱讀模式
CSS部份加入

  1. /* Visibility Hidden */
  2.   .Hidden {
  3.    visibility: hidden;
  4.   }
  5. /* Visibility Visible */
  6.   .Visible {
  7.    visibility: visible;
  8.   }
複製代碼
JavaScript部份

  1. function classChange(element,newclass) {
  2. element.className = newclass;
  3. }
複製代碼
HTML部份

  1. <p class="normal"
  2. onMouseOver="classChange(invisible,'Visible')"
  3. onMouseOut="classChange(invisible,'Hidden')">
  4. This is a normal paragraph, placed after a paragraph
  5. that has the class <strong>Hidden</strong>.
  6. Move the mouse over this paragraph to reveal the
  7. hidden one; move the mouse off to hide it again.
  8. </p>
  9. </div>
複製代碼
 樓主| 發表於 2005-12-26 13:54:34 | 顯示全部樓層
Layer3.style.visibility = "visible"; <--顯示
Layer4.style.visibility = "hidden"; <--隱藏
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|彩色筆小沛的知識庫

GMT+8, 2024-11-24 08:01 , Processed in 0.007658 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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