00
00
| 值 | 描述 |
|---|---|
| none | 此元素不會被顯示。 |
| block | 此元素將顯示為塊級元素,此元素前後會帶有換行符。 |
| inline | 默認。 此元素會被顯示為內聯元素,元素前後沒有換行符。 |
| inline-block | 行內塊元素。 (CSS2.1 新增的值) |
| list-item | 此元素會作為列表顯示。 |
| run-in | 此元素會根據上下文作為塊級元素或內聯元素顯示。 |
| compact | CSS 中有值compact,不過由於缺乏廣泛支持,已經從CSS2.1 中刪除。 |
| marker | CSS 中有值marker,不過由於缺乏廣泛支持,已經從CSS2.1 中刪除。 |
| table | 此元素會作為塊級表格來顯示(類似<table>),表格前後帶有換行符。 |
| inline-table | 此元素會作為內聯表格來顯示(類似<table>),表格前後沒有換行符。 |
| table-row-group | 此元素會作為一個或多個行的分組來顯示(類似<tbody>)。 |
| table-header-group | 此元素會作為一個或多個行的分組來顯示(類似<thead>)。 |
| table-footer-group | 此元素會作為一個或多個行的分組來顯示(類似<tfoot>)。 |
| table-row | 此元素會作為一個表格行顯示(類似<tr>)。 |
| table-column-group | 此元素會作為一個或多個列的分組來顯示(類似<colgroup>)。 |
| table-column | 此元素會作為一個單元格列顯示(類似<col>) |
| table-cell | 此元素會作為一個表格單元格顯示(類似<td> 和<th>) |
| table-caption | 此元素會作為一個表格標題顯示(類似<caption>) |
| inherit | 規定應該從父元素繼承display 屬性的值。 |
youtube 重複播放 [autoplay + loop + playlist Attributes] 自動播放autoplay=1 重複播放loop=1 播放列表playlist=影片ID 本片ID i1_02Myn3Pg https://www.youtube.com/embed/i1_02Myn3Pg?autoplay=1 &loop=1 &playlist=i1_02Myn3Pg
youtube 不顯影片完結推廣 [rel=0 Attributes] 不顯影片完結推廣rel=0 https://www.youtube.com/embed/i1_02Myn3Pg?autoplay=1&rel=0
youtube 不顯示播放器控制選項 [controls=0 Attributes] 不顯影片完結推廣rel=0 https://www.youtube.com/embed/i1_02Myn3Pg?autoplay=1&rel=0&controls=0
youtube 靜音 [mute=1 Attributes] 不顯影片完結推廣rel=0 https://www.youtube.com/embed/i1_02Myn3Pg?autoplay=1&rel=0&mute=1
| 属性 | 描述 |
|---|---|
| src | 指定要被嵌入的網頁的網址 (URL) |
| height | 指定 iframe 的高度,單位為像素 (pixel / %) |
| width | 指定 iframe 的寬度,單位為像素 (pixel / %) |
| name | 指定 iframe 的名稱 Name是可以重複的 |
| id | 指定 iframe 的身份證號碼 ID顯然是唯一的 |
| frameborder | frameborder= 1 / 0 ,規定是否顯示框架周圍的邊框 |
| longdesc | 規定一個頁面,該頁面包含了有關 iframe 的較長描述 |
| marginheight | 定義 iframe 的頂部和底部的邊距 |
| marginwidth | 定義 iframe 的左側和右側的邊距 |
| sandbox | 該屬性對呈現在iframe框架中的內容啟用一些額外的限制條件 sandbox="" 啟用所有限制條件 sandbox="allow-same-origin" 允許將內容作為普通來源對待。如果未使用該關鍵字,嵌入的內容將被視為一個獨立的源 sandbox="allow-top-navigation" 嵌入的頁面的上下文可以導航(加載)內容到頂級的瀏覽上下文環境(browsing context)。如果未使用該關鍵字,這個操作將不可用 sandbox="allow-forms" 允許表單提交。 sandbox="allow-scripts" 允許腳本執行。 |
| scrolling | 規定是否在 iframe 中顯示滾動條 scrolling = "yes" scrolling = "no" scrolling = "auto" |
| seamless | 規定 <iframe> 看上去像是包含文檔的一部分 |
| srcdoc | 規定在 <iframe> 中顯示的頁面的 HTML 內容 |
| allow-forms | 允許提交表單 |
| allow-modals | 允許打開 modal 視窗 |
| allow-orientation-lock | 允許鎖定螢幕方向,像是智慧型手機的水平朝向或垂直朝向 |
| allow-pointer-lock | 允許使用 Pointer Lock API |
| allow-popups | 允許彈跳視窗,像是可以用 target="_blank" |
| allow-popups-to-escape-sandbox | 允許彈跳視窗不繼承 sandbox 的設定 |
| allow-presentation | 允許開啟 presentation session |
| allow-same-origin | 允許將 iframe 的內容視作 same origin |
| allow-scripts | 允許 iframe 內容可以執行 JavaScript |
| allow-top-navigation | 允許 iframe 可以將內容載入到 top level 的父層視窗,像是可以用 target="_top" |
| allow-top-navigation-by-user-activation | 允許 iframe 可以將內容載入到 top level 的父層視窗,如果是使用者手動去點擊的話 sandbox: 當有這屬性時,表示針對 iframe 裡面的網頁啟用一些限制條件,屬性值如果留空表示啟用所有限制,當有設定值的時候表示移除這些限制,你可以用空格設定移除多個限制條件。可以用的值有 |
HTML 內聯框架元素 < iframe > 表示嵌套的browsing context,
它能夠將另一個 HTML 頁面嵌入到當前頁面中。
<iframe id="iframe " ></iframe>
iframe = document.getElementById('iframe')
ifdoc =iframe.contentWindow.document.body
ifdoc =iff.contentWindow.document.body
ifdoc.innerHTML = ' html 內容 '
HTML 內聯框架元素 <iframe> 表示嵌套的browsing context,
它能夠將另一個 HTML 頁面嵌入到當前頁面中。
使用document.write()建立的iframe文件,
<iframe id="iframe " ></iframe>
var ifdoc = document.getElementById('iframe ').contentWindow.document,
ifdoc.open()
ifdoc.write( html 內容 )
ifdoc.write( html 內容 )
ifdoc.write( html 內容 )
ifdoc.close()
| font-size: 20px ; |
| color : black ; |
| font-weight : normal ; |
| font-style: normal ; |
| font-family: serif ; |
| text-transform: initial ; |
| text-decoration : inherit ; |
| line-height: normal; |
| word-spacing: normal; |
| letter-spacing:normal; |
| object.style.fontSize = "20px"; |
| object.style.color = "black"; |
| object.style.fontWeight = "normal"; |
| object.style.fontStyle = "normal"; |
| object.style.fontFamily = "serif"; |
| object.style.textTransform = "initial"; |
| object.style.textDecoration = "inherit"; |
| object.style.lineHeight = "normal"; |
| object.style.wordSpacing = "normal"; |
| object.style.letterSpacing = "normal"; |