IE下如何設置iframe背景透明

首先:在iframe標籤中加入 allowtransparency="true"屬性
然後:在調用的頁面的<body>標籤里加入 style="background:transparent;"

示例:
<iframe allowtransparency="ture" src="aa.html" width="500" height="500"></iframe>

aa.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body bgColor="transparent">
asda<br>
das<br>
sad<br>
asdddddddddddddddddddd
</body>
</html>

 

轉載文章請註明轉載自:酷碼資源

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章