2005年08月5日
內置框架的背景透明
讓內置框架的背景完全透明很簡單
假設,我們要讓frame.html鑲入於bg.html並且背景完全透明,意即frame.html看到的背景是為bg.html
首先準備兩個HTML文件,bg.html以及frame.html
在內鑲視窗frame.html的<body>改成:
<body style="BACKGROUND-COLOR: transparent">
非內鑲頁bg.html,找出<iframe...>語法,並且加上allowTransparency
像這樣:
<iframe src="frame.html" width="80%" height="80%" allowTransparency></iframe>
另一種方法
alert(document.all("magicalFRAME").allowTransparency)
顯示出內嵌框架magicalFRAME的透明狀態
document.all("angelFRAME").allowTransparency = true
將內嵌框架AngelFRAME設定為可透明顯示
首先準備兩個HTML文件,bg.html以及frame.html
在內鑲視窗frame.html的<body>改成:
<body style="BACKGROUND-COLOR: transparent">
非內鑲頁bg.html,找出<iframe...>語法,並且加上allowTransparency
像這樣:
<iframe src="frame.html" width="80%" height="80%" allowTransparency></iframe>
另一種方法
alert(document.all("magicalFRAME").allowTransparency)
顯示出內嵌框架magicalFRAME的透明狀態
document.all("angelFRAME").allowTransparency = true
將內嵌框架AngelFRAME設定為可透明顯示
引用URL
http://cgi.blog.roodo.com/trackback/342023
回應文章 
Posted by 于靖
at 2009年06月28日 19:51
