CSS控制 隱藏 & 顯示
CSS部份加入/* Visibility Hidden */
.Hidden {
visibility: hidden;
}
/* Visibility Visible */
.Visible {
visibility: visible;
}
JavaScript部份
function classChange(element,newclass) {
element.className = newclass;
}
HTML部份
<p class="normal"
onMouseOver="classChange(invisible,'Visible')"
onMouseOut="classChange(invisible,'Hidden')">
This is a normal paragraph, placed after a paragraph
that has the class <strong>Hidden</strong>.
Move the mouse over this paragraph to reveal the
hidden one; move the mouse off to hide it again.
</p>
</div>
Layer3.style.visibility = "visible"; <--顯示
Layer4.style.visibility = "hidden"; <--隱藏
頁:
[1]