您的位置:首页 > 其它

使 iframe 在插入的面背景透明

2011-01-25 21:48 253 查看
网上查到让一个iframe 背景透明的办法:

首先在<body
style="background-color:transparent"></body>

然后:

<iframe
src="你的地址" allowtransparency="true"
style="background-color:transparent"
title="test" frameborder="0"
width="470" height="308" scrolling="no"></iframe>

问题在于这里src里的文件不再我本机上,,我没办法设置它的<body
style="background-color:transparent"></body>
如下,我要引用天气预报:

<iframe src="http://weather.265.com/weather.htm" width="168" height="54"
frameborder="no" border="0" marginwidth="0" marginheight="0"
scrolling="no"></iframe>

我的底色是蓝的,可这个底色是白的http://weather.265.com/weather.htm

这样该怎么办?

那就不要用iframe实现,你先把这个页面得到它的内部,然后再显示在页面里,

可以用ajax得到这个页面
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: