HTML 內聯架構(inner frame)
iframe內聯架構 用於在網頁內顯示網頁。 添加 iframe 的文法
<iframe src="URL"></iframe>
URL指向隔離頁面的位置。
Iframe - 設定高度和寬度
height 和 width 屬性用於規定 iframe 的高度和寬度。
屬性值的預設單位是像素,但也可以用百分比來設定(比如“80%”)
執行個體:
<body><iframe src="test02.html" width="200" height="100"></iframe><p>某些老式的瀏覽器不支援內聯架構</p><p>如果不支援,則 iframe是不可見的</p></body>
在瀏覽器中顯示的效果:
<iframe> 標籤的 scrolling 屬性
定義和用法
scrolling 屬性規定了是否在iframe 中顯示捲軸。
預設地,如果內容超出了ifrme,捲軸就會出現。
執行個體:scrolling屬性設定為YES。
<body><iframe src="test02.html" width="200" height="100" marginheight="50px" scrolling="yes"></iframe><p>某些老式的瀏覽器不支援內聯架構</p><p>如果不支援,則 iframe是不可見的</p></body>
scrolling屬性設定為no。
<body><iframe src="test02.html" width="200" height="100" marginheight="50px" scrolling="no"></iframe><p>某些老式的瀏覽器不支援內聯架構</p><p>如果不支援,則 iframe是不可見的</p></body>
執行個體:在當前引用頁開啟新的連結;
<body><iframe src="test02.html" width="200" height="100" name="iframe_test"></iframe><br /><a href="http://blog.csdn.net/leemin_ios/article/details/51544513" target="iframe_test">技術部落格連結</a><p>如果不支援,則 iframe是不可見的</p></body>