2012-01-28 6 views
4

DIV 레이어를 프레임 셋 위에 그려야합니다. DIV가 <frameset> 안에 배치 될 수 있다고 들었지만 저에게는 적합하지 않습니다.DIV를 FRAMESET 위에 놓는 방법?

다음 예는 작동하지 않습니다. 나는 Firebug HTML-inspector에서 DIV를 보지 못한다.

<!doctype html> 
<html> 

<head> 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
<title>Test of frameset with div</title> 

<style type="text/css"> 
#flashContent { 
position:fixed; 
left:200px; 
bottom:200px; 
width:400px; 
height:400px; 
background-color:red; 
z-order:1000; 
} 
</style> 

</head> 

<frameset rows="*,100px" style="z-order:10"> 



<frame src="content1.html"> 
<frame src="bottom.html"> 

<div id="flashContent"> 
    Something 
</div> 


</frameset> 

</html> 
+0

프레임은 기본적으로 창 개체입니다. 윈도우에 관한 모든 규칙은 프레임에 적용됩니다. div는 창 안쪽에있는 문서에 속합니다. 문서가 창을 벗어날 수 없기 때문에 div는 창을 벗어날 수 없습니다. 당신은 브라우저의 레벨에서 컨트롤을 요구하고 있지만, 당신이 허용되는 것은 문서의 레벨에서 컨트롤입니다. – Mhmd

답변

7

당신은 framesets 위에 DIVs를 배치 할 수 없습니다. 달성 할 수있는 유일한 방법은 DIViFrame 위에 두는 것입니다. 적어도 최신 브라우저 (no IE6).

은 코드 예제 당로서 당신은 당신의 DIV 절대적으로 z-index 재산을 포함하여 위치를 가지고

#flashContent { 

    position: absolute; 
    left: 200px; 
    bottom: 200px; 
    z-index: 2; 

    width:400px; 
    height:400px; 
    background-color:red; 
}