日本語
一种漂光制御图片移動的网页特效
<style type="text/css"> #mainid{position:absolute;right:5px;top:10px;height:435px;width:650px;overflow:hidden;background: #fff;左: 400 ピクセル;ボーダー: 3 ピクセルの実線 #666666;} .imgbox{位置:絶対;左:35ピクセル;マージントップ:20px;上:105ピクセル; z インデックス:90;幅:100px;高さ:100px;背景:#ffffff} .moveimgbox{位置:絶対;左:700ピクセル;マージントップ:20px;上:105ピクセル; z インデックス:90;幅:100px;高さ:100px;背景:#ffffff} </style> <script> var tinyed=0; var okToGo = true; var currentCreature = 1; var forwardBackward = 1; var firstnum = 1; var secnum = 2; var tounum=1; function moveItem(firstnum,secnum){ if(okayToGo&& firstnum != secnum){ tounum=firstnum; document.getElementById("y"+firstnum).style.zIndex = 50+10*forwardBackward; document.getElementById("y"+secnum).style.zIndex = 50+20*forwardBackward; startTheMove =window.setInterval(function(){rightOrLeft(firstnum,secnum)},20); } } function rightOrLeft(firstnum,secnum) { if (ticked == 1020) { window.clearInterval(startTheMove);チェックマーク = 0;前方後方 = 1; okToGo = true; } else { okToGo = false; thisAngle = (Math.PI/2)*(ティック/1000); document.getElementById("y"+firstnum).style.left = " "+(735-Math.sin(thisAngle)*700)+"px"; document.getElementById("y"+firstnum).style.top = " "+(105-(forwardBackward*Math.cos(thisAngle)*55))+"px"; document.getElementById("y"+secnum).style.left = " "+(735-Math.sin(thisAngle+Math.PI/2)*700)+"px"; document.getElementById("y"+secnum).style.top = " "+(105-(forwardBackward*Math.cos(thisAngle+Math.PI/2)*55))+"px"; += 20 にチェックを入れます。 } } </script> <a href="javascript:moveItem(1,tounum);"><img src="/img/200406301.jpg" width="129" height="97"></a> < a href="javascript:moveItem(2,tounum);"><img src="/img/200406302.jpg" width="134" height="100"></a><br/> <a href= "javascript:moveItem(3,tounum);"><img src="/img/200406303.jpg" width="134" height="100"></a> <a href="javascript:moveItem(4, tounum);"><img src="/img/200406304.jpg" width="101" height="134"></a> <div align="right" id="mainid"> <div id=" y1" class="imgbox"><img src="/img/200406301.jpg" width="400" height="300"></div> <div id="y2" class="moveimgbox"><img src="/img/200406302.jpg" width="400" height="300"></div> <div id="y3" class="moveimgbox"><img src="/img/200406303.jpg" width="387" height="290"></div> <div id="y4" class="moveimgbox"><img src="/img/200406304.jpg" width="281" height="374" ></div> </div>