html中對于iframe的allowTransparency屬性的詳細(xì)說明
發(fā)表時(shí)間:2024-05-11 來源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]IE5.5開始支持浮動(dòng)框架的內(nèi)容透明。如果想要為浮動(dòng)框架定義透明內(nèi)容,則必須滿足下列條件。1.與 iframe 元素一起使用的 allowTransparency 標(biāo)簽屬性必須設(shè)置為 true。2.在 iframe 內(nèi)容源文檔,background-color 或 body 元素的 bgColor...
IE5.5開始支持浮動(dòng)框架的內(nèi)容透明。如果想要為浮動(dòng)框架定義透明內(nèi)容,則必須滿足下列條件。
1.與 iframe 元素一起使用的 allowTransparency 標(biāo)簽屬性必須設(shè)置為 true。
2.在 iframe 內(nèi)容源文檔,background-color 或 body 元素的 bgColor 標(biāo)簽屬性必須設(shè)置為 transparent。
具體步驟: 1. 包含框架頁的代碼。
<body bgColor="#eeeeee">
<iframe allowTransparency="true" src="transparent.htm">
</iframe>
2.transparent.htm頁的代碼。
<body bgColor="transparent">
特別說明
本例主要是iframe對象的allowTransparency屬性應(yīng)用,在該屬性設(shè)置為true并且iframe所載加頁的背景顏色設(shè)置為transparent(透明)時(shí)iframe將透明化。
allowTransparency設(shè)置或獲取對象是否可為透明。
bgColor 設(shè)置或獲取對象的背景顏色。
以上就是html中關(guān)于iframe的allowTransparency屬性的詳解的詳細(xì)內(nèi)容,更多請關(guān)注php中文網(wǎng)其它相關(guān)文章!
網(wǎng)站建設(shè)是一個(gè)廣義的術(shù)語,涵蓋了許多不同的技能和學(xué)科中所使用的生產(chǎn)和維護(hù)的網(wǎng)站。