Dieser Artikel beschreibt die Methode von JS, um durchscheinende und allmählich aufzeigende Spezialeffekte in Bildern mit neun Netze zu erreichen. Teilen Sie es für Ihre Referenz. Die spezifische Implementierungsmethode lautet wie folgt:
Kopieren Sie den Code wie folgt: <html>
<titels> Bilder mit Neun Grid durchscheinend und allmählich zeigen Effekt </title>
<body>
<Style type = text/css> .invisible {
Filter: Alpha (Opazität = 0)
}
</Style>
<Script Language = JavaScript1.2>
<!-
Funktion hoch (WHOS2) {
theObject = won2
Hervorhebung = setInterval ("Highlight (theObject)", 50)
}
Funktion niedrig (wobei 2) {
ClearInterval (Hervorhebung)
was2.Filters.Alpha.Opacity = 0
}
Funktion Highlight (cur2) {
if (cur2.filters.alpha.opacity <100)
Cur2.Filters.Alpha.Opacity+= 10
sonst wenn (window.highlighting)
ClearInterval (Hervorhebung)
}
//->
</Script>
<Table BorderColor =#999999 Cellspacing = 8 Cellpadding = 0 Breite = 302
Border = 0> <tbody>
<tr>
<Td width = 90 Hintergrund = text1.gif bgcolor =#db4d0e
Höhe = 90> <a href = ""> <img
class = unsichtbar onmouseover = hoch (this) onmouseout = low (this)
src = "/images/m01.jpg" border = 0 width = 180px Höhe = 135px> </a> </td>
<Td width = 90 Hintergrund = text2.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = unsichtbar onmouseover = hoch (this) onmouseout = low (this)
src = "/bicture/m02.jpg" border = 0 width = 180px hohe = 135px> </a> </td>
<Td width = 90 Hintergrund = text3.gif bgcolor =#ff9f07> <a
href = ""> <img class = Invisible
onmouseover = hoch (this) onmouseout = low (this) src = "/images/m03.jpg"
border = 0 width = 180px Höhe = 135px> </a> </td> </tr>
<tr>
<Td Hintergrund = text4.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = unsichtbar onmouseover = hoch (this) onmouseout = low (this)
src = "/bicture/m04.jpg" border = 0 width = 180px hohe = 135px> </a> </td>
<Td Hintergrund = text5.gif bgcolor =#a5d523> <a
href = "/"> <img
class = unsichtbar onmouseover = hoch (this) onmouseout = low (this)
src = "/bicture/m05.jpg" border = 0 width = 180px hohe = 135px> </a> </td>
<Td Hintergrund = text6.gif bgcolor =#c56e19> <a
href = "/"> <img
class = unsichtbar onmouseover = hoch (this) onmouseout = low (this)
src = "/bils/m06.jpg" border = 0 width = 180px hohe = 135px> </a> </td> </tr>
<tr>
<Td Hintergrund = text12.gif bgcolor =#ff9f07> <a
href = "/"> <img
class = unsichtbar onmouseover = hoch (this) onmouseout = low (this)
src = "/bicture/m07.jpg" border = 0 width = 180px Höhe = 135px> </a> </td>
<Td Hintergrund = text8.gif bgcolor =#c56e19> <a
href = "/"> <img
class = Invisible OnmouseOver = High (this) onmouseout = low (this) src = "/bils/m08.jpg"
Border = 0 Breite = 180px Höhe = 135px> </a> </td>
<Td Hintergrund = text7.gif bgcolor =#C56E19> <a
href = "/"> <img
class = unsichtbar onmouseover = hoch (this) onmouseout = low (this)
src = "/bicture/m09.jpg" border = 0 width = 180px hohe = 135px> </a> </td> </tr> </tbody> </table>
</body>
</html>
Ich hoffe, dieser Artikel wird für JavaScript -Programme aller hilfreich sein.