image




<html xmlns="http://www.w3.org/1999/xhtml" >

<head>

<title></title>

<script language="javascript">

// getPageSize() 메소드는 lightbox2.04 를 참고 하였습니다.

function getPageSize() {


var xScroll, yScroll;


if (window.innerHeight && window.scrollMaxY) {

xScroll = window.innerWidth + window.scrollMaxX;

yScroll = window.innerHeight + window.scrollMaxY;

} else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac

xScroll = document.body.scrollWidth;

yScroll = document.body.scrollHeight;

} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari

xScroll = document.body.offsetWidth;

yScroll = document.body.offsetHeight;

}


var windowWidth, windowHeight;


if (self.innerHeight) {



// all except Explorer

if (document.documentElement.clientWidth) {

windowWidth = document.documentElement.clientWidth;

} else {

windowWidth = self.innerWidth;

}

windowHeight = self.innerHeight;

} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode

windowWidth = document.documentElement.clientWidth;

windowHeight = document.documentElement.clientHeight;

} else if (document.body) { // other Explorers

windowWidth = document.body.clientWidth;

windowHeight = document.body.clientHeight;

}


// for small pages with total height less then height of the viewport

if (yScroll < windowHeight) {

pageHeight = windowHeight;

} else {

pageHeight = yScroll;

}


// for small pages with total width less then width of the viewport

if (xScroll < windowWidth) {

pageWidth = xScroll;

} else {

pageWidth = windowWidth;

}


return [pageWidth, pageHeight];

}







//리사이즈시 다시체크

function CheckTicket() {

//alert("리사이즈체크")

var arrayPageSize = getPageSize()

document.getElementById("overlay").style.width = arrayPageSize[0];

document.getElementById("overlay").style.height = arrayPageSize[1];

}







//덮기 테스트

function Test() {

var arrayPageSize = getPageSize()

document.getElementById("overlay").style.width = arrayPageSize[0];

document.getElementById("overlay").style.height = arrayPageSize[1];

}

window.onresize = CheckTicket //사용자가 윈도우 크기를 조정하면 다시 그사이즈에 맞게 덮어줍니다.

</script>


<!?아래는 반투명 스타일 시트-->

<style>


#overlay{

position:absolute ; left:0px; top:0px; width:10px; height:10px; z-index:100; filter:alpha(opacity=50);

background-color: #000;

}

</style>

</head>

<body onload="Test()">


<br />

전체화면 덮는 레이어 테스트<br />


<img src="image.jpg" style="width: 422px; height: 186px" />

<div id="overlay"> ß전체를 덮을 레이어

</div>


<p>

&nbsp;</p>

<p>

</p>


</body>

</html>

+ Recent posts