인터넷정보

마우스 오버시 그림이 무자게 떨려요...

알 수 없는 사용자 2007. 10. 17. 13:38


http://oxtag.com/html/ex/shakeimg.html

 
<html>

<head>
<title>♡ 카멜롯™의 소스천국 태그피아 ♡</title>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<style>
.shakeimage{
position:relative
}
</style>

<script language="JavaScript1.2">
<!---Edited by JASKO-->
<!---Web Site : http://www.javascript.co.kr-->
<!--
var rector=3
var stopit=0
var a=1
function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}
function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}
function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}
//-->
</script>

</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p>&nbsp;</p>
<CENTER>
<img src="http://oxtag.com/zboard/data/gallery/ani26.gif" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)" width="250px">
<img src="http://oxtag.com/zboard/data/gallery/ani26.gif" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)" width="250px">
<img src="http://oxtag.com/zboard/data/gallery/ani26.gif" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)" width="250px">
</CENTER>


<p align="center"><span style="font-size:9pt;"><font color="gray">그림위에 마우스
올려 보세요. 이거 응용하면 아주 잼나겠는데요. 많이 가져 가세요.</font></span>


</body>

</html>

반응형