홈페이지 소스 질문입니다.. 정보
홈페이지 소스 질문입니다..본문
어떤 사이트들어가보니 제가 하고싶은 소스가 있는데 어떻게 검색해야 나오는지 모르겠더라구요
사이트주소는 http://www.tanmonster.co.kr/
여기구요
제가 사용하고싶은 소스는 백그라운드 이미지가 저렇게 계속 바뀌는걸 하고싶거든요
고수님들 부탁드립니다 ㅜㅡㅜ..
사이트주소는 http://www.tanmonster.co.kr/
여기구요
제가 사용하고싶은 소스는 백그라운드 이미지가 저렇게 계속 바뀌는걸 하고싶거든요
고수님들 부탁드립니다 ㅜㅡㅜ..
댓글 전체
ㅋㅋㅋㅋ
소스투척합니다.
심심해서 찾다가 외국사이트에서 발견함...
=====================소스시작========================
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="description" content="" />
<title>이미지Fade</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js "></script>
<!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
</head>
<script type="text/javascript">
var aImages = new Array();
var iPrev = -1;
var iRnd = -1;
aImages[0] = "http://canvasinabox.com/preview/7/47/47-7-preview_large.jpg";
aImages[1] = "http://canvasinabox.com/preview/7/48/48-7-preview_large.jpg";
aImages[2] = "http://canvasinabox.com/preview/7/46/46-7-preview_large.jpg";
aImages[3] = "http://canvasinabox.com/preview/18/133/133-18-preview_large.jpg";
aImages[4] = "http://canvasinabox.com/preview/27/174/174-27-preview_large.jpg";
aImages[5] = "http://canvasinabox.com/preview/27/173/173-27-preview_large.jpg";
aImages[6] = "http://canvasinabox.com/preview/5/25/25-5-preview_large.jpg";
$(document).ready(function() {
/* Define the function that triggers to fade in the background as soon as the image has loaded */
$("img#bg").load(function() {
/* Fade in during 3 seconds */
$("img#bg").fadeTo(500,1);
/* Set the timeout to fade out the image and the description after 10 seconds*/
setTimeout(function() {
$("img#bg").fadeOut(500);
/* Load the next image after 4 seconds */
setTimeout(LoadImages,1000);
}
,9000);
}
)
/* Start the slideshow one second after the page is ready */
setTimeout(LoadImages,1000);
});
function LoadImage(iNr) {
/* Assign the new image to the background */
$("img#bg").attr("src", aImages[iNr]);
};
function LoadImages() {
/* Select a random image number and make sure this is not equal to the previous image */
while(iPrev == iRnd) {
iRnd = Math.floor(Math.random()*aImages.length);
}
/* Show the selected image */
LoadImage(iRnd);
iPrev = iRnd;
};
</script>
<img id="bg" src="" />
=====================소스끝========================
소스투척합니다.
심심해서 찾다가 외국사이트에서 발견함...
=====================소스시작========================
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="description" content="" />
<title>이미지Fade</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js "></script>
<!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
</head>
<script type="text/javascript">
var aImages = new Array();
var iPrev = -1;
var iRnd = -1;
aImages[0] = "http://canvasinabox.com/preview/7/47/47-7-preview_large.jpg";
aImages[1] = "http://canvasinabox.com/preview/7/48/48-7-preview_large.jpg";
aImages[2] = "http://canvasinabox.com/preview/7/46/46-7-preview_large.jpg";
aImages[3] = "http://canvasinabox.com/preview/18/133/133-18-preview_large.jpg";
aImages[4] = "http://canvasinabox.com/preview/27/174/174-27-preview_large.jpg";
aImages[5] = "http://canvasinabox.com/preview/27/173/173-27-preview_large.jpg";
aImages[6] = "http://canvasinabox.com/preview/5/25/25-5-preview_large.jpg";
$(document).ready(function() {
/* Define the function that triggers to fade in the background as soon as the image has loaded */
$("img#bg").load(function() {
/* Fade in during 3 seconds */
$("img#bg").fadeTo(500,1);
/* Set the timeout to fade out the image and the description after 10 seconds*/
setTimeout(function() {
$("img#bg").fadeOut(500);
/* Load the next image after 4 seconds */
setTimeout(LoadImages,1000);
}
,9000);
}
)
/* Start the slideshow one second after the page is ready */
setTimeout(LoadImages,1000);
});
function LoadImage(iNr) {
/* Assign the new image to the background */
$("img#bg").attr("src", aImages[iNr]);
};
function LoadImages() {
/* Select a random image number and make sure this is not equal to the previous image */
while(iPrev == iRnd) {
iRnd = Math.floor(Math.random()*aImages.length);
}
/* Show the selected image */
LoadImage(iRnd);
iPrev = iRnd;
};
</script>
<img id="bg" src="" />
=====================소스끝========================
로컬 PC 에서도 잘 돌아가네요
쩌네여 ㅡㅋㅋㅋ
ㅋㅋ 이미지 경로가 외국사이트 쪽이라; 좀 로드가 느리네여..이미지 경로 바꾸시면 빠르게 참고사이트 쪽과 똑같은 효과나올거에요