소스보고 좀 어떻게 하는건지 도와주세요 ㅠ
마우스 움직임에 따라 화면이미지도 같이 이동할 수있는 태그 좀 알려주세요 ㅠㅠ
(이건 디자인 고도에 있던 이미지 자세히 보기) 소스인대요. 봐도 모르겠어요 ㅠ
제가 만들어 보려고 하는 것은 라코스테 홈페이지 처럼 가로로 메인이미지가 길어서
마우스 그냥 무클릭 상태에서 움직일때 이미지도 같이 움직이는 것을 만들고 싶거든요..
도와주세요!
<script>
function fitwin()
{
window.resizeTo(150,150);
var borderX = 150 - document.body.clientWidth;
var borderY = 150 - document.body.clientHeight;
width = document.images[0].width + borderX;
height = document.images[0].height + borderY;
windowX = (window.screen.width-width);
windowY = (window.screen.height-height)/2;
if(width>screen.width){
width = screen.width;
windowX = 0;
}
if(height>screen.height-50){
height = screen.height-50;
windowY = 0;
}
//window.moveTo(windowX,windowY);
window.resizeTo(width+200,height);
}
function move()
{
x_per = (document.images[0].width-document.body.clientWidth)/document.body.clientWidth;
y_per = (document.images[0].height-document.body.clientHeight)/document.body.clientHeight;
window.scroll(window.event.clientX*x_per,window.event.clientY*y_per);
}
</script>
<title>이미지 자세히 보기</title>
<body style="margin:0" scroll=no onLoad=fitwin()>
<div align=center><img src="../data/sample/1224125692g0.jpg" onClick="window.close();" style="cursor:hand" onmousemove='move()' usemap=""></div>
</body>
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 11개
라코스테는 플래시로 구축된 사이트인데, 그런 효과를 자바스크립트등을 통해서 구현하고 싶다시는거죠?
ps.그보다 수상경력 쩌는군요
누구라도 같은 규정을 지켜야죠. 미국식 사고방식이라 죄송.
답변 출동!!!
↓↓↓↓↓↓↓↓↓
답변 출동!!!
↓↓↓↓↓↓↓↓↓
답변 출동!!!
↓↓↓↓↓↓↓↓↓