HTML學習13-iframe內聯架構__HTML

來源:互聯網
上載者:User
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>





聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.