마우스 롤오버시 서서히 변하는 이미지에 블라인드 효과주기.. > 그누4 팁자료실

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.

마우스 롤오버시 서서히 변하는 이미지에 블라인드 효과주기.. 정보

마우스 롤오버시 서서히 변하는 이미지에 블라인드 효과주기..

본문



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
<!--
//속도설정
var delay = 3000; //자동 전환 대기 시간 3초
var transDelay = 0.5; //변환시간 0.5초
//속도설정 끝

var num=1;
var tid=0;

function transimg(place) {
  clearTimeout(tid);
  num=place;
  imgg.filters.blendTrans.stop();
  imgg.filters.blendTrans.apply();
  if (place==1) imgg.src="01.jpg";
  if (place==2) imgg.src="02.jpg";
  if (place==3) imgg.src="03.jpg";
  imgg.filters.blendTrans.play();
}

function go() {
  switch (num) {
    case 1 : location.href=""; break;
    case 2 : location.href="http://www.korea.com"; break;
    case 3 : location.href="http://www.yahoo.com"; break;
  }
}

function change() {
  if(num<3) transimg(num+1);     //if구문의 수식은 num<이미지개수
  else transimg(num=1);
  auto_on();
}

function auto_on() {
  tid=setTimeout('change()',delay)
}
// -->
</script>
</head>

<body onload="imgg.filters.blendTrans.duration=transDelay;auto_on()">
<table align="center" border="1" cellpadding="0" cellspacing="0">
    <tr>
        <td rowspan="3"><img src="01.jpg" name="imgg" width="640" height="480" onclick="go()" style="visibility:visible;filter:blendTrans()" /></td>
        <td><img src="01.jpg" width="210" height="158" onmouseover="transimg(1)" onmouseout="auto_on()" /></td>
    </tr>
    <tr>
        <td><img src="02.jpg" width="210" height="158" onmouseover="transimg(2)" onmouseout="auto_on()" /></td>
    </tr>
    <tr>
        <td><img src="03.jpg" width="210" height="158" onmouseover="transimg(3)" onmouseout="auto_on()" /></td>
    </tr>
</table>
</body>
</html>

추천
2
  • 복사

댓글 4개

© SIRSOFT
현재 페이지 제일 처음으로