フレーム

フレーム

  フレーム表示のいろいろ
    フレーム表示とは、画面を分割して表示することです。
    分割方法には、次のような方法があります。

      ・縦分割
      ・横分割
      ・縦・横分割
      ・横・縦分割
      ・縦・横3分割
      ・横・縦3分割

  分割表示には、次のファイルが必要になります。

    indexファイル  index.htm または index.html など
        分割方法と、最初に表示するファイルを指示するファイル

        縦分割のindexファイル       横分割のindexファイル

        縦・横分割のindexファイル     横・縦分割のindexファイル

        縦・横3分割のindexファイル    横・縦3分割のindexファイル

    分割された画面に、最初に表示するファイル。


  indexファイルのソースファイルの表示方法


  フレームの表示の指示

    <frameset cols="200,*"> 〜 </frameset> … 縦分割指定(ピクセル指定)
    <frameset rows="200,*"> 〜 </frameset> … 横分割指定(ピクセル指定)
    <frameset cols="20%,80%"> 〜 </frameset> … 縦分割指定(%指定)
    <frameset rows="20%,80%"> 〜 </frameset> … 横分割指定(%指定)

    <frame src="****.***" name="a"> … フレームのソースファイルを****.***にし、フレームのリンク名をcとする。

    <frame src="****.***" name="a" marginwidth="10" marginheight="0"> … 左右、上下のマージンを指定する。
    <frame src="****.***" name="a" scrolling="no"> … 画面のスクロールを指定。"no","yes","all"


  リンクしたファイルを表示する画面領域の指定

    <a href="****.***"> 〜 </a> … 〜の部分をクリックすると、同じ画面領域にファイル****.***が表示される。
    <a href="****.***" target="c"> 〜 </a> … 〜の部分をクリックすると、c領域にファイル****.***が表示される。

    <a href="****.***" target="new"> 〜 </a> … 〜の部分をクリックすると、新しくブラウザを起動し、ファイル****.***が表示。


  indexファイルの記述例

    縦分割のindexファイル
ブラウザでの表示 ソースファイル(%)指定 ソースファイル(ピクセル指定)

<html>
<head>
<title>フレーム</title>
<frameset cols="20%,80%">
<frame src="menu.htm" name="a">
<frame src="start.htm" name="c">
</frameset>
</head>
</html>
<html>
<head>
<title>フレーム</title>
<frameset cols="200,*">
<frame src="menu.htm" name="a">
<frame src="start.htm" name="c">
</frameset>
</head>
</html>



    横分割のindexファイル
ブラウザでの表示 ソースファイル(%)指定 ソースファイル(ピクセル指定)

<html>
<head>
<title>フレーム</title>
<frameset rows="20%,80%">
<frame src="on.htm" name="b">
<frame src="start.htm" name="c">
</frameset>
</head>
</html>
<html>
<head>
<title>フレーム</title>
<frameset rows="200,*">
<frame src="on.htm" name="b">
<frame src="start.htm" name="c">
</frameset>
</head>
</html>



    縦・横分割のindexファイル
ブラウザでの表示 ソースファイル(%)指定 ソースファイル(ピクセル指定)

<html>
<head>
<title>フレーム</title>
<frameset cols="20%,80%">
<frame src="menu.htm" name="a">
<frameset rows="20%,80%">
<frame src="on.htm" name="b">
<frame src="start.htm" name="c">
</frameset>
</frameset>
</head>
</html>
<html>
<head>
<title>フレーム</title>
<frameset cols="200,*">
<frame src="menu.htm" name="a">
<frameset rows="200,*">
<frame src="on.htm" name="b">
<frame src="start.htm" name="c">
</frameset>
</frameset>
</head>
</html>



    横・縦分割のindexファイル
ブラウザでの表示 ソースファイル(%)指定 ソースファイル(ピクセル指定)

<html>
<head>
<title>フレーム</title>
<frameset rows="20%,80%">
<frame src="on.htm" name="b">
<frameset cols="20%,80%">
<frame src="menu.htm" name="a">
<frame src="start.htm" name="c">
</frameset>
</frameset>
</head>
</html>
<html>
<head>
<title>フレーム</title>
<frameset rows="200,*">
<frame src="on.htm" name="b">
<frameset cols="200,*">
<frame src="menu.htm" name="a">
<frame src="start.htm" name="c">
</frameset>
</frameset>
</head>
</html>



    縦・横3分割のindexファイル
ブラウザでの表示 ソースファイル(%)指定 ソースファイル(ピクセル指定)

<html>
<head>
<title>フレーム</title>
<frameset cols="20%,80%">
<frame src="menu.htm" name="a">
<frameset rows="20%,70%,10%">
<frame src="on.htm" name="b">
<frame src="start.htm" name="c">
<frame src="bottom.htm" name="d">
</frameset>
</frameset>
</head>
</html>
<html>
<head>
<title>フレーム</title>
<frameset cols="200,*">
<frame src="menu.htm" name="a">
<frameset rows="100,*,50">
<frame src="on.htm" name="b">
<frame src="start.htm" name="c">
<frame src="bottom.htm" name="d">
</frameset>
</frameset>
</head>
</html>



    横・縦3分割のindexファイル
ブラウザでの表示 ソースファイル(%)指定 ソースファイル(ピクセル指定)

<html>
<head>
<title>フレーム</title>
<frameset rows="20%,80%">
<frame src="on.htm" name="b">
<frameset cols="20%,70%,10%">
<frame src="menu.htm" name="a">
<frame src="start.htm" name="c">
<frame src="bottom.htm" name="d">
</frameset>
</frameset>
</head>
</html>
<html>
<head>
<title>フレーム</title>
<frameset rows="100,*">
<frame src="on.htm" name="b">
<frameset cols="200,*,100">
<frame src="menu.htm" name="a">
<frame src="start.htm" name="c">
<frame src="bottom.htm" name="d">
</frameset>
</frameset>
</head>
</html>