首先:在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>