|
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>
複製代碼 |
|