웹마스터 팁

마우스 따라다니는 자바 소스 입니다..
마우스 주면을 빙글빙글 돌면서 따라 다닙니다..
수정을 할 것은 별로 없으며...어두운 배경화면에 사용을 하시면 됩니다..
밝은 배경에는 잘 안 보이네요..
<body> 부분에 복사 하여 붙여넣어 주시면 돼요...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<!-- 자바소스 여기서 부터-->
<BODY bgcolor="black">
<LAYER NAME="a0" LEFT="10" TOP="10" VISIBILITY="show" BGCOLOR="yellow" CLIP="0,0,3,3" id="layer1" width="200" height="200" z-index="1">
    <p> </p>
</LAYER>
<LAYER NAME="a1" LEFT="10" TOP="10" VISIBILITY="show" BGCOLOR="yellow" CLIP="0,0,3,3" id="layer2" width="200" height="200" z-index="1">
    <p> </p>
</LAYER>
<LAYER NAME="a2" LEFT="10" TOP="10" VISIBILITY="show" BGCOLOR="yellow" CLIP="0,0,3,3" id="layer3" width="200" height="200" z-index="1">
    <p> </p>
</LAYER>
<LAYER NAME="a3" LEFT="10" TOP="10" VISIBILITY="show" BGCOLOR="yellow" CLIP="0,0,3,3" id="layer4" width="200" height="200" z-index="1">
    <p> </p>
</LAYER>
<LAYER NAME="a4" LEFT="10" TOP="10" VISIBILITY="show" BGCOLOR="yellow" CLIP="0,0,3,3" id="layer5" width="200" height="200" z-index="1">
    <p> </p>
</LAYER>
<LAYER NAME="a5" LEFT="10" TOP="10" VISIBILITY="show" BGCOLOR="yellow" CLIP="0,0,3,3" id="layer6" width="200" height="200" z-index="1">
    <p> </p>
</LAYER>
<LAYER NAME="a6" LEFT="10" TOP="10" VISIBILITY="show" BGCOLOR="yellow" CLIP="0,0,3,3" id="layer7" width="200" height="200" z-index="1">
    <p> </p>
</LAYER>

<p><script language="JavaScript">
<!--

if (document.all){
document.write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
for (xy=0;xy<7;xy++)
document.write('<div style="position:relative;width:3px;height:3px;background:#FFFF00;font-size:2px;visibility:visible"></div>')
document.write('</div>')
}

if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var yAmpl = 10;
var yMax = 40;
var step = .2;
var ystep = .5;
var currStep = 0;
var tAmpl=1;
var Xpos = 1;
var Ypos = 1;
var i = 0;
var j = 0;

if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}

else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}



function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
}

if (document.all)
{
var totaldivs=document.all.starsDiv.all.length
for ( i = 0 ; i < totaldivs ; i++ )
{
var tempdiv=document.all.starsDiv.all[i].style
tempdiv.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
tempdiv.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
}
}

else if (document.layers)
{
for ( j = 0 ; j < 7 ; j++ )
{
var templayer="a"+j
document.layers[templayer].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
document.layers[templayer].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
}
currStep += step;
setTimeout("animateLogo()", 15);
}
animateLogo();
// -->
</script>
</BODY><!--여기까지 자바 소스 적용을 하시면 됩니다.-->
</HTML>


미리보기 http://kmsmaru.com/javascript_cursor/Dancing_Stars_Cursor.html
출처;http://www.dynamicdrive.com/dynamicindex13/star.htm
제목 글쓴이 날짜
이미지를 HTML table tag로 변환. [7] file 민이 2002.12.31
국내 IP정보를 조회하는 클래스 [7] 행복한고니 2003.01.04
[동주아빠] PHP 게시판(23강) - 내용 보기 기능(1) view.php 디자인 손병목 2003.01.04
[동주아빠] PHP 게시판(24강) - 내용 보기 기능(2) view.php 소스 file 손병목 2003.01.04
[동주아빠] PHP 게시판(25강) - 내용 보기 기능(3) 설명 [1] 손병목 2003.01.04
access 자료(mdb) 를 MySQL로 변환하는 방법 [8] 황선규 2003.01.06
[1분짜리 팁] 절대경로 알아내기! [14] 찐군 2003.01.09
웹서핑중 구했습니다. 조그만 달력.. [6] file 황선규 2003.01.10
[동주아빠] PHP 게시판(26강) - 수정(modify.php) 손병목 2003.01.11
[동주아빠] PHP 게시판(27강) - 수정(modify_ok.php) 손병목 2003.01.11
[동주아빠] PHP 게시판(28강) - 삭제(delete.php) 손병목 2003.01.11
[동주아빠] PHP 게시판(끝.29강) - 삭제(delete_ok.php) [18] 손병목 2003.01.11
웹 인증 보호, 윈도우 로그인 폼 이용 (authenticate) [9] file 둘리나라™ 2003.01.13
파일 하나로 끝내는-_- NZEO 북마크...-_-a [14] ineal 2003.01.13
텍스트 링크, 배너 링크*랜덤 (틀팁포함) [3] 둘리나라™ 2003.01.16
국내 IP 조회하는 클래스.(소켓사용) [1] 행복한고니 2003.01.17
엔지오 처럼 주소 /?channel=about 식으로 만들기 [18] 위니 2003.01.21
[제로카운터 수정하기#1-초보용] 테이블 다 지우고 새로 설치하기 [2] 김태훈 2003.01.22
[제로카운터 수정하기#2-초보용] 새로 설치후 예전 방문자수로 고치기(최고방문자수 문제해결됨) 김태훈 2003.01.22
[제로카운터 수정하기#3-초보용] 어제 오늘 방문자수 변경하기 김태훈 2003.01.22