Artikel ini menjelaskan metode JS untuk mencapai efek khusus yang tembus cahaya dan secara bertahap dalam sembilan gambar. Bagikan untuk referensi Anda. Metode implementasi spesifik adalah sebagai berikut:
Salin kode sebagai berikut: <Html>
<title> sembilan gambar-gambar tembus cahaya dan secara bertahap menunjukkan efek </iteme>
<body>
<Type style = text/css> .invisible {
Filter: alpha (opacity = 0)
}
</tyle>
<Bahasa skrip = javascript1.2>
<!-
fungsi tinggi (yang2) {
theObject = yang2
Sorot = setInterval ("Sorotan (TheObject)", 50)
}
fungsi rendah (yang2) {
ClearInterval (Sorot)
yang2.filters.alpha.opacity = 0
}
function highlight (cur2) {
if (cur2.filters.alpha.opacity <100)
Cur2.filters.alpha.opacity+= 10
lain jika (window.highlight)
ClearInterval (Sorot)
}
//->
</script>
<Table BorderColor =#999999 CellSpacing = 8 CellPadding = 0 Lebar = 302
Border = 0> <tbody>
<tr>
<Td width = 90 latar belakang = text1.gif bgcolor =#db4d0e
tinggi = 90> <a href = ""> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This)
src = "/gambar/m01.jpg" border = 0 lebar = 180px tinggi = 135px> </a> </td>
<Lebar TD = 90 latar belakang = text2.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This)
src = "/gambar/m02.jpg" border = 0 lebar = 180px tinggi = 135px> </a> </td>
<Td width = 90 latar belakang = text3.gif bgcolor =#ff9f07> <a
href = ""> <img class = Invisible
onmouseover = tinggi (ini) onmouseout = rendah (ini) src = "/gambar/m03.jpg"
BORDER = 0 Lebar = 180px Tinggi = 135px> </a> </td> </tr>
<tr>
<Latar belakang TD = text4.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This)
src = "/gambar/m04.jpg" border = 0 lebar = 180px tinggi = 135px> </a> </td>
<Latar belakang TD = text5.gif bgcolor =#a5d523> <a
href = "/"> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This)
src = "/gambar/m05.jpg" border = 0 lebar = 180px tinggi = 135px> </a> </td>
<Latar belakang TD = text6.gif bgcolor =#c56e19> <a
href = "/"> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This)
src = "/gambar/m06.jpg" border = 0 lebar = 180px tinggi = 135px> </a> </td> </tr>
<tr>
<Latar belakang TD = text12.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This)
src = "/gambar/m07.jpg" border = 0 lebar = 180px tinggi = 135px> </a> </td>
<Latar belakang TD = text8.gif bgcolor =#c56e19> <a
href = "/"> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This) Src = "/Images/M08.jpg"
BORDER = 0 Lebar = tinggi 180px = 135px> </a> </td>
<Latar belakang TD = text7.gif bgcolor =#c56e19> <a
href = "/"> <img
class = Invisible Onmouseover = High (This) Onmouseout = Low (This)
src = "/gambar/m09.jpg" border = 0 width = 180px tinggi = 135px> </a> </td> </tr> </tbody> </able>
</body>
</html>
Saya harap artikel ini akan membantu pemrograman JavaScript semua orang.