Ce qui suit est le code du programme:
Copier le code du code comme suit:
<!
<html>
<adal>
<meta http-equiv = "content-type" content = "text / html; charset = gb2312" /> />
<meta http-equiv = "x-ua-compatible" content = "ie = emulatie7" />
<Title> Picture Flip Effect </TITME>
<Style type = "text / css">
.Box {Overflow: Hidden; Positive: relatif;}
.txt {largeur: 100%;
Texte-aligne: Centre; filtre: Alpha (opacité = 80);
# b1 {Background: URL (http://biyuan.tk/u/upload/201310221457326875.jpg);
# b2 {Background: URL (http://biyuan.tk/u/upload/201310221457486875.jpg);
# B3 {Background: URL (http://biyuan.tk/u/upload/201310221458149843.jpg);
</ style>
</ head>
<body>
<div id = "obj">
<div id = "b1"> <div> Description du texte <br/> Description du texte </ br /> texte </div> </div>
<div id = "b2"> <div> Description du texte <br/> Description du texte </ br /> texte </div> </div>
<div id = "b3"> <div> Description du texte <br/> Description du texte </ br /> texte </div> </div>
</div>
<script type = "text / javascript">
Fonction show (o, s, v) {{
ClearInterval (show.prototype ["A" + V]);
Show.prototype ["a" + v] = setInterval (function () {
if (s == -1) {
if (o.offsetTop <= -o.parentNode.offsetheight) {{
o.style.top = -o.parentnode.offsetheight + "px";
Return ClearInterval (show.prototype ["a" + v]);
}
} Autre {
if (o.offsetTop> = -10) {
o.style.top = 0;
Return ClearInterval (show.prototype ["a" + v]);
}
}
o.style.top = (o.offsettop * 1 + 10 * s) + "px";
}, 10);
}
var igs = document.getElementByid ('obj').
pour (var i = 0; i <igs.length; i ++) {
if (igs [i] .classname == "box") {{
(Fonction (x) {
igs [x] .onMouseOver = function () {
Show (this.childNodes [0], 1, x);
this.onmouseout = function () {
Show (this.childNodes [0], -1, x);
}
}
}) (je);
}
}
</cript>
</docy>
</html>
Aperçu de l'effet: http://biyuan.tk/u/upload/201310221500310000.html