基本语法
<frameset> ... </frameset> <frame src="url"> <noframes> ... </noframes> 在 <noframes> 标记后的文字将只出现在不支持 FRAMES 的浏览器中。
<HTML> <HEAD> </HEAD> <FRAMESET> <FRAME SRC="url"> <NOFRAMES> ... </NOFRAMES> </FRAMESET> </HTML>
各窗口的尺寸设置
<frameset cols=#> 纵向排列多个窗口: <frameset cols=30%,20%,50%> <frame src="A.html"> <frame src="B.html"> <frame src="C.html"> </frameset>
A B C
<frameset rows=#> 横向排列多个窗口: <frameset rows=25%,25%,50%> <frame src="A.html"> <frame src="B.html"> <frame src="C.html"> </frameset>
A B C
COLS & ROWS 纵横排列多个窗口: <frameset cols=20%,*> <frame src="A.html"> <frameset rows=40%,*> <frame src="B.html"> <frame src="C.html"> </frameset> </frameset>
A B C
不允许各窗口改变大小 <frame noresize> 缺省设置是允许各窗口改变大小的。
各窗口间相互操作(Frame Target)
窗口标识(Frame Name) <frame name=#> <a href=url target=#> <frameset cols=50%,50%> <frame src="A.html"> <frame src="B.html" name="HELLO"> </frameset>
A B
特殊的 4 类操作(很有用喔) <a href=url target=_blank> 新窗口 <a href=url target=_self> 本窗口 <a href=url target=_parent> 父窗口 <a href=url target=_top> 整个浏览器窗口
Frame 的外观(Appearance)
各窗口边框的设置 <frame frameborder=#> #=yes, no / 1, 0 <frameset rows=30%,*> <frame src="Acol.html" frameborder=1> <frameset cols=30%,*> <frame src="Bcol.html" frameborder=0> <frame src="Ccol.html" frameborder=0> </frameset> </frameset>
(A 有边框,B、C 没有) A B C
各窗口间空白区域的设置 <frameset framespacing=#> #=空白区域的大小 <frameset rows=30%,* framespacing=100> <frame src="Acol.html"> <frameset cols=30%,*> <frame src="Bcol.html"> <frame src="Ccol.html"> </frameset> </frameset>
A B C
边框色彩 <frameset bordercolor=#> #=rrggbb 16 进制 RGB 数码, 或者是下列预定义色彩名称: Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime, Fuchsia, White, Green, Purple, Silver, Yellow, Aqua <frameset rows=30%,* bordercolor=red> <frame src="Acol.html"> <frameset cols=30%,*> <frame src="Bcol.html"> <frame src="Ccol.html"> </frameset> </frameset>
A B C
页面空白(Margin) <frame marginwidth=# marginheight=#> <frameset cols=50%,50%> <frame src="A.html"> <frame src="A.html" marginwidth=50 marginheight=50> </frameset>
AAAA AA AA
卷滚条设置 <frame scrolling=#> #=yes, no, auto #=缺省值是 auto。
浮动窗口(Floating Frame)
<iframe src=# name=##> ... </iframe> #=初始页面的 URL ##=窗口标识(Frame Name)(之后可对此标识进行各窗口间相互操作) ... = 此处文字将只出现在不支持 FRAMES 的浏览器中。 <center> <iframe src="A.html" name="window"> Here is a Floating Frame </iframe> <br><br> <a href="A.html" target="window">Load A</A><BR> <a href="B.html" target="window">Load B</A><BR> <a href="Ccol.html" target="window">Load C</A><BR> </center>
Display A.html
Load A Load B Load C
没有相关教程
|