經過使用框架,咱們能夠在同一個瀏覽器窗口中顯示不止一個頁面。每份HTML文檔稱爲一個文檔,而且每一個框架都獨立於其餘框架。html
框架結構標籤(<frameset>)瀏覽器
1.它定義如何分割窗口
框架
2.每一個frameset定義一系列行或者列spa
3.rows/columns的值規定了每行或每列佔據屏幕的面積
code
框架標籤(frame)htm
frame標籤訂義了放置在每一個框架中的HTML文檔。
utf-8
備註:1.若是框架有可見邊框,用戶能夠拖動邊框來改變它的大小。若是不想用戶改變邊框大小,能夠在<frame>標籤中添加noresize="noresize"。文檔
2.不能將<body>標籤與<frameset>標籤同時使用。
it
示例class
1.垂直框架
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> This is my HTML</title> </head> <frameset cols="50%,50%"> <frame src="http://www.baidu.com"></frame> <frame src="file:///C:/Documents%20and%20Settings/Administrator/桌面/lixianli.html"></frame> </frameset> </html>
2.水平框架
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> This is my HTML</title> </head> <frameset rows="50%,50%"> <frame src="http://www.baidu.com"></frame> <frame src="file:///C:/Documents%20and%20Settings/Administrator/桌面/lixianli.html"></frame> </frameset> </html>
3.混合框架
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> This is my HTML</title> </head> <frameset rows="50%,50%"> <frame src="file:///C:/Documents%20and%20Settings/Administrator/桌面/lixianli.html"></frame> <frameset cols="25%,75%"> <!-- 設置這個html文件的邊框不容許被改變--> <frame src="http://www.qq.com/" noresize="noresize"></frame> <frame src="http://www.baidu.com/"></frame> </frameset> </frameset> </html>