以下は程序代コード: 复制代コード 代コード如下: <頭> 写真翻訳转効果 <br>.box {overflow:hidden;position:relative;} <br>.txt {width:100%;height:100%;background:#f51146;font-size:12px;position:absolute;top:-100 %;色:白; <br>text-align:center;filter:alpha(Opacity=80);-moz-opacity:0.8;opacity:0.8;} <br>#b1 {background:url(http://biyuan.tk/u/)アップロード/201310221457326875.jpg);幅:232px;高さ:232px;} <br>#b2 {background:url(http://biyuan.tk/u/upload/201310221457486875.jpg);幅:110px;高さ:110px ;} <br>#b3 {background:url(http://biyuan.tk/u/upload/201310221458149843.jpg);width:110px;height:110px;} <br> 文字说明文字说明文字 文字说明文字说明文字 文字说明文字说明文字 <br>関数 Show(o, s, v){ <br>clearInterval(Show.prototype["a" v]); <br>Show.prototype["a" v] = setInterval(function(){ <br>if(s == -1) { <br>if(o.offsetTop <= -o.parentNode.offsetHeight) { <BR>o.style.top = -o.parentNode.offsetHeight "px"; <BR>return clearInterval(Show.prototype["a" v]); <BR>} <BR>} else { <BR>if (o.offsetTop >= -10) { <BR>o.style.top = 0; <BR>return clearInterval(Show.prototype["a" v]); <BR> o.style.top = (o.offsetTop * 1 10 * s) "px" <BR>}, 10); <BR>} <BR>var igs = document.getElementById('obj').getElementsByTagName("div"); <BR>for(var i = 0; i <igs.length; i ) { <BR>if(igs[i].className == "box") { <BR>(function(x){ <BR> igs[x].onmouseover = function(){ <BR>Show(this.childNodes[0], 1, x); <BR>this.onmouseout = function() { <BR>Show(this.childNodes[0] , -1, x); <BR>} <BR>} <BR>})(i); <BR>} <BR>} <BR>