ต่อไปนี้เป็นรหัสโปรแกรม:
คัดลอกรหัสรหัสดังนี้:
<!
<html>
<head>
<meta http-equiv = "content-type" content = "text /html; charset = gb2312" /> />
<meta http-equiv = "x-ua ที่เข้ากันได้" เนื้อหา = "ie = emulatie7" />
<title> เอฟเฟกต์ภาพพลิกรูปภาพ </title>
<style type = "text/css">
.Box {Overflow: Hidden;
.TXT {ความกว้าง: 100%;
Text-Align: Center;
#b1 {พื้นหลัง: url (http://biyuan.tk/u/upload/201310221457326875.jpg);
#b2 {พื้นหลัง: url (http://biyuan.tk/u/upload/201310221457486875.jpg);
#b3 {พื้นหลัง: url (http://biyuan.tk/u/upload/201310221458149843.jpg);
</style>
</head>
<body>
<div id = "obj">
<div id = "b1"> <div> คำอธิบายข้อความ <br/> คำอธิบายข้อความ </br/> ข้อความ </div> </div>
<div id = "b2"> <div> คำอธิบายข้อความ <br/> คำอธิบายข้อความ </br/> ข้อความ </div> </div>
<div id = "b3"> <div> คำอธิบายข้อความ <br/> คำอธิบายข้อความ </br/> ข้อความ </div> </div>
</div>
<script type = "text/javascript">
ฟังก์ชั่นแสดง (o, s, v) {{
ClearInterval (show.prototype ["A" + V]);
show.prototype ["a" + v] = setInterval (function () {
ถ้า (s == -1) {
if (o.offsettop <= -o.parentNode.offSetheight) {{
o.style.top = -o.parentNode.offSetheight + "px";
ส่งคืน ClearInterval (show.prototype ["A" + V]);
-
} อื่น {
if (O.OffSettop> = -10) {
o.style.top = 0;
ส่งคืน ClearInterval (show.prototype ["A" + V]);
-
-
o.style.top = (o.offsettop * 1 + 10 * s) + "px";
}, 10);
-
var igs = document.getElementById ('obj')
สำหรับ (var i = 0; i <igs.length; i ++) {
if (igs [i] .className == "box") {{
(ฟังก์ชั่น (x) {
igs [x] .onmouseover = function () {
แสดง (this.childnodes [0], 1, x);
this.onmouseout = function () {
แสดง (this.childnodes [0], -1, x);
-
-
}) (ฉัน);
-
-
</script>
</body>
</html>
ตัวอย่างเอฟเฟกต์: http://biyuan.tk/u/upload/201310221500310000.html