이 기사는 반투명을 달성하고 9 개의 그리드 그림에서 특수 효과를 점차적으로 드러내는 JS 방법을 설명합니다. 참조를 위해 공유하십시오. 특정 구현 방법은 다음과 같습니다.
다음과 같이 코드를 복사하십시오. <html>
<title> 9 개의 그리드 사진 반투명하고 점차적으로 효과를 보여줍니다 </title>
<body>
<스타일 유형 = text/css> .invisible {
필터 : 알파 (불투명도 = 0)
}
</스타일>
<스크립트 언어 = javaScript1.2>
<!-
기능이 높습니다 (whit2) {
theObject = what2
강조 표시 = setInterval ( "하이라이트 (TheObject)", 50)
}
기능이 낮다 (Whet2) {
ClearInterval (강조 표시)
whith2.filters.alpha.opacity = 0
}
기능 하이라이트 (CUR2) {
if (cur2.filters.alpha.opacity <100)
cur2.filters.alpha.opacity+= 10
else if (window.highlighting)
ClearInterval (강조 표시)
}
//->
</스크립트>
<테이블 BorderColor =#999999 CellSpacing = 8 CellPadding = 0 너비 = 302
국경 = 0> <tbody>
<tr>
<td width = 90 배경 = text1.gif bgcolor =#db4d0e
높이 = 90> <a href = ""> <img
class = invisible onmouseover = high (this) onmouseout = low (this)
src = "/images/m01.jpg"테두리 = 0 너비 = 180px 높이 = 135px> </a> </td>
<td width = 90 배경 = text2.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = invisible onmouseover = high (this) onmouseout = low (this)
src = "/images/m02.jpg"테두리 = 0 너비 = 180px 높이 = 135px> </a> </td>
<td width = 90 배경 = text3.gif bgcolor =#ff9f07> <a
href = ""> <img class = 보이지 않습니다
OnMouseOver = High (this) onMouseOut = LOW (this) SRC = "/images/m03.jpg"
Border = 0 너비 = 180px 높이 = 135px> </a> </td> </tr>
<tr>
<td background = text4.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = invisible onmouseover = high (this) onmouseout = low (this)
src = "/images/m04.jpg"테두리 = 0 너비 = 180px 높이 = 135px> </a> </td>
<td background = text5.gif bgcolor =#a5d523> <a
href = "/"> <img
class = invisible onmouseover = high (this) onmouseout = low (this)
src = "/images/m05.jpg"테두리 = 0 너비 = 180px 높이 = 135px> </a> </td>
<td background = text6.gif bgcolor =#c56e19> <a
href = "/"> <img
class = invisible onmouseover = high (this) onmouseout = low (this)
src = "/images/m06.jpg"테두리 = 0 너비 = 180px 높이 = 135px> </a> </td> </tr>
<tr>
<td background = text12.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = invisible onmouseover = high (this) onmouseout = low (this)
src = "/images/m07.jpg"테두리 = 0 너비 = 180px 높이 = 135px> </a> </td>
<td background = text8.gif bgcolor =#c56e19> <a
href = "/"> <img
class = invisible onmouseover = high (this) onmouseout = low (this) src = "/images/m08.jpg"
Border = 0 너비 = 180px 높이 = 135px> </a> </td>
<td background = text7.gif bgcolor =#c56e19> <a
href = "/"> <img
class = invisible onmouseover = high (this) onmouseout = low (this)
src = "/images/m09.jpg"테두리 = 0 너비 = 180px 높이 = 135px> </a> </td> </tr> </tbody> </table>
</body>
</html>
이 기사가 모든 사람의 JavaScript 프로그래밍에 도움이되기를 바랍니다.