製作步驟

  1. 選擇欲插入iframe的位置
  2. 切換至【顯示程式碼檢視】
  3. 貼上<iframe>標籤, 如:
    <iframe name="mainFrame" frameborder="0" width="700" height="300" class="iframe-style" src="http://www.fg.tp.edu.tw" > </iframe>
  4. 製作並套用CSS樣式, 如:
    <style type="text/css" >
    <!--
    .iframe-style {
    border: thin dashed #666666;
    width: 700px;
    height: 300px;
    }
    -->
    </style>

<iframe>標籤屬性

  • name: 設定頁框名稱 (也就是連結的目標名稱)
  • frameborder: 設定框線粗細
  • width: 設定寬度
  • height: 設定高度
  • class: 指定CSS樣式
  • src: 指定連結路徑