Free JavaScripts provide
좌측이미지를 원하시는것으로 교체하실수가 있으며 삽입하셔야 합니다. |
<title>좌측에서 위아래로 스크롤되는 로고</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="style.css">
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="start();">
<div id="point1" STYLE="width:200px; height:200px; position:absolute; left:50px; top:50px; z-index:1; visibility:visible;">
<img src="http://lia.pe.kr/icon/icon/ham.gif" width=110 height=54 border=0> </div>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Bruce W.Anderson (appletlib@about.com) -->
<!-- Web Site: http://appletlib.tripod.com/dhtml/elevator.html -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var xPos = 20;
var step = 1;
var delay = 30;
var yPos = 0;
var height = 0;
var offset = 0;
var yon = 0;
var name = navigator.appName;
if (name == "Microsoft Internet Explorer") {
yPos = document.body.clientHeight;
point1.style.top = yPos;
}
else {
yPos = window.innerHeight;
document.point1.pageY = yPos;
document.point1.visibility = "hidden";
}
function changePos() {
if (yon == 0) {
yPos = yPos - step;
}
else {
yPos = yPos + step;
}
if (name == "Microsoft Internet Explorer") {
height = document.body.clientHeight;
offset = point1.offsetHeight;
}
else {
height = window.innerHeight;
offset = document.point1.clip.height;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - offset)) {
yon = 0;
yPos = (height - offset);
}
if (name == "Microsoft Internet Explorer") {
point1.style.left = xPos;
point1.style.top = yPos + document.body.scrollTop;
}
else {
document.point1.pageX = xPos;
document.point1.pageY = yPos + window.pageYOffset;
}
}
function start()
{
if (name != "Microsoft Internet Explorer") {
document.point1.visibility = "visible";
}
loopfunc();
}
function loopfunc()
{
changePos();
setTimeout('loopfunc()',delay);
}
// End -->
</script>
'Javascript' 카테고리의 다른 글
| 배경색상 전환효과 (0) | 2016.06.01 |
|---|---|
| 배경이미지 스크롤 효과 (0) | 2016.06.01 |
| 일정시간후 자동으로 닫히는 윈도우 (0) | 2016.06.01 |
| 입력폼에 문구가 나오는 스크립트 (0) | 2016.06.01 |
| 링크에 마우스오버시 입력폼이벤트 (0) | 2016.06.01 |