frame 태그 > [D]HTML Tip

본문 바로가기

사이트 내 전체검색

뒤로가기 [D]HTML Tip

frame 태그

본문

frame은 윈도우를 개념상 갈라 놓은 것으로 window 객체와 동격이다.
frameset 태그는 frame들에 대한 정보만을 정의, 관리하므로 body 태그 대신 쓰인다.
 
<html>
<head><title>~</title>
</head>

<frameset rows="30%, *">
    <frame name="f1" src="">
  <frameset cols="30%, *">
        <frame name="f2" src="">
        <frame name="f3" src="">
    </frameset>
</frameset>

</html>
 
위의 예는 하나의 프레임페이지로 복합분할한 대표적인 예이다.
속성으로는 cols, rows, frameBorder, borderColor, frameSpacing 등이 있다.
ex) cols="30%, *" //칼로 쪼개듯 세로 분할, 30%와 나머지란 뜻
ex) rows="1*, 2*, 3*" //밭고랑 만들듯 가로 분할, 1*, 2*, 3* = 1:2:3의 비율 분할
 
 
 
[문서1_index.php]
<html>
<head><title>~</title>
</head>

<frameset rows="30%, *">
      <frame name="f1" src="">
      <frame name="subframeset" src="sub.html">
</frame>

</html>
 
[문서2_sub.html]
<html>
<head><title>~</title>
</head>
 
<frameset cols="30%, 70%">
      <frame name="f2" src="">
      <frame name="f3" src="">
</frameset>
 
</html>
 
위의 예는 두 개의 문서로 프레임을 복합분할한 경우이며 결과는 앞전과 같다.
다만 프레임의 계층구조만 parent에서 parent-top으로 달라질 뿐이다.
 
 
[주소 정리용]
URL을 깔끔하게 정리하는 용도로 통프레임으로 정의해 쓰기도 한다.
이건 가끔 쓰이는 방법으로, 개발 전단계까지 서버 접속 상태에서 제작하여
완성 후 연결하는 방법이다.
 
<html>
<head>
    <title>::::::::::::::</title>
    <meta http-equiv="content-type" content="text/html; charset=euc-kr">
</head>

<frameset rows="100%" frameborder="0" framespacing="0" cols="1">
      <frame src="work.php" name="main" scrolling="auto" frameborder="0" border="0" marginwidth="0" marginheight="0">
</frameset>

</html>
 
즉, work.php 도큐를 인덱스처럼 사용한 다음 index.html에 끌어온다는 것이다.

댓글목록 0

등록된 댓글이 없습니다.

전체 52건 1 페이지
게시물 검색
Copyright © www.qdata.co.kr All rights reserved.

사이트 정보

PC 버전으로 보기