본문 바로가기

Fade Background

MintState 2008년 10월 29일 오후 8:50 조회 10968

Fade Background
 

<script language="JavaScript"> 
<!-- 
function namosw_fade_background(r1, g1, b1, r2, g2, b2, maxstep) 
{ 
  var i, r, g, b; 
  for (i = 0; i <= maxstep; i++) { 
    r = Math.floor((r1*(maxstep-i) + r2*i)/maxstep); 
    g = Math.floor((g1*(maxstep-i) + g2*i)/maxstep); 
    b = Math.floor((b1*(maxstep-i) + b2*i)/maxstep); 
    namosw_fade_setbgcolor(r, g, b) 
  } 
} 

function namosw_fade_setbgcolor() 
{ 
  var hexchars = '0123456789abcdef'; 
  var i; 
  var color_str = '#'; 
  var args = namosw_fade_setbgcolor.arguments; 
  if (args.length != 3) 
    return; 
  for (i = 0; i < 3; i++) { 
    color_str += hexchars.charAt(Math.floor(args[i]/16)); 
    color_str += hexchars.charAt(args[i]%16); 
  } 
  document.bgColor = color_str; 
} 

// --> 
</script> 

<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" OnLoad="namosw_fade_background(0, 0, 0, 255, 255, 255, 20);">.. 
공유 X Facebook LINE QR 코드

댓글 0개

첫 댓글을 남겨보세요.