iframe說明
它比frameset 靈活,可以嵌入到body標簽中击碗。可以嵌入到任何指定的位置上谋逻,做為網(wǎng)頁整體的一部份塔插。
一、iframe標簽中的常用屬性
屬性名 | 單位 | 屬性值 | 描述 |
---|---|---|---|
src | 指定引用的網(wǎng)頁地址 | ||
name | 給frame取的名稱 | ||
width | px糯崎,% | 像素几缭,百份比 | 定義 iframe 的寬度。 |
height | px沃呢,% | 像素年栓,百份比 | 定義 iframe 的高度。 |
srcdoc | 規(guī)定在 <iframe> 中顯示的頁面的 HTML 內(nèi)容薄霜。 | ||
sendbox | "" allow-forms allow-same-origin allow-scripts allow-top-navigation | 啟用一系列對 <iframe> 中內(nèi)容的額外限制某抓。 | |
frameborder | 0或1 | 規(guī)定是否顯示框架周圍的邊框 | |
seamless | seamless | 規(guī)定 <iframe> 看上去像是包含文檔的一部分。 | |
longdesc | url | 規(guī)定一個包含有關框架內(nèi)容的長描述的頁面惰瓜。 | |
marginheight | px | 定義框架的上方和下方的邊距搪缨。 | |
marginwidth | px | 定義框架的左側和右側的邊距。 | |
noresize | noresize | 規(guī)定無法調整框架的大小鸵熟。 | |
scrolling | yes/no/auto | 規(guī)定是否在框架中顯示滾動條副编。 |