웹마스터 팁

==========================
http://diyworld.biz/test.html
링크언제 긑어질지 모릅니다.
==========================


포탈사이트나 개인사이트 가시면 떠다니는 레이어를 보실수 있을겁니다.
아래소스는 레이어를 이용해 공중에 떠다는 소스입니다.

<body> //바디밑에 <div> 소스를 넣으면 됩니다.
<div id="img" style="width:200px; height:200px; position:absolute; left:50px; top:50px; z-index:1;">
<a href="http://www.여기에원하는주소"><img src="여기에는 떠다니는그림화일" border="0" onMouseDown="pauseResume();"></a>
</div>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Justin Arruda (JArruda@mindspring.com) -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var step = 1;    <-높을수록 빠릅니다.
var delay = 30;  <-delay입니다. 놓을수록 느리고 낮을수록 빠릅니다.
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
var name = navigator.appName;
if(name == "Microsoft Internet Explorer") name = true;
else name = false;
var xPos = 20;
if(name) var yPos = document.body.clientHeight;
else var yPos = window.innerHeight;
function changePos() {
if(name) {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
}
else {
height = window.innerHeight;
width = window.innerWidth;
Hoffset = document.img.clip.height;
Woffset = document.img.clip.width;
document.img.pageY = yPos + window.pageYOffset;
document.img.pageX = xPos + window.pageXOffset;
}
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
   }
}
function start() {
if(name) img.visibility = "visible";
else document.img.visibility = "visible";
interval = setInterval('changePos()',delay);
}
function pauseResume() {
if(pause) {
clearInterval(interval);
pause = false;
}
else {
interval = setInterval('changePos()',delay);
pause = true;
   }
}
start();
//  End -->
</script>


멋진 그림을 떠다니게 하세요.
좋으면 추천부탁드립니다.
제목 글쓴이 날짜
텔넷 사용자 관리... 쇠물택 2002.02.24
[sapzils서버세팅] A+P+M 소스 설치 [4] 쇠물택 2002.02.24
wuftp에서 proftp로...그리고, proftp 설정하기 [1] 쇠물택 2002.02.24
메모리 절약하기 - 리눅스 오픈소스 2002.02.24
[강좌끝이다~!]와우리눅스7.0을 서버로 두고 인터넷공유 [8] RealComty 2002.02.23
[강좌4탄]와우리눅스7.0을 서버로 두고 인터넷공유 [2] RealComty 2002.02.23
[re] [강좌4탄]와우리눅스7.0을 서버로 두고 인터넷공유 [2] 주영명 2002.02.27
[강좌3탄]와우리눅스7.0을 서버로 두고 인터넷공유 [4] RealComty 2002.02.23
[강좌2탄]와우리눅스7.0을 서버로 두고 인터넷공유 [1] RealComty 2002.02.23
[강좌1탄]와우리눅스7.0을 서버로 두고 인터넷공유 [1] RealComty 2002.02.23
[리눅스]proftp 에서 사용자가 상위 폴더로 이동을 못하게... [3] teenteenv 2002.02.22
에러페이지를 서버관리자가 지정한 페이지로. [1] teenteenv 2002.02.21
vi 편집기 사용시 비프음 제어 오픈소스 2002.02.21
커널 버전 알아내기 [1] 오픈소스 2002.02.21
[APM자동설치] APM_Setup 3 ( Apache, PHP4, MySQL, Perl, Tomcat ) [6] 근땅e 2002.02.06
아파치 웹서버 속도 빠르게 하기 위한 최적화 팁 [14] 차카게살자 2002.01.27
APC(Alternativ PHP Cache) 사용법( php 캐쉬 플러그인 ) [1] file 김도한 2002.01.29
MySQL 관리 첫걸음 [5] 앤디(andy) 2001.04.18
{주목} CodeRed 아파치로그파일 지우기 [2] skyel 2001.08.22
linuxerv무료계정 백업받기^^ [2] ^^shaki 2001.02.05