首页 > 编程知识 正文

contentwindow属性,网页发布后没有iframe标签了

时间:2023-05-05 23:14:13 阅读:58967 作者:1034

在iframe中调用的页面在IE下(IE9除外)以白色背景显示。 调用的页面没有设置背景色,系统的背景色默认为白色。 怎么让它透明?

网络上已经有很多答案:

将allowTransparency='true '属性添加到iframe标记中

也就是说:

iframe src=' iframe.html ' width=' 600 px ' height=' 500px ' allow transparency=' true ' scrolling=' no ' frameborder

实际上,在调用的页面的主体中添加style=' background-color : transparent '是没有必要的,但IE5.5或更高版本(不包括)则不再需要使用

allowTransparency属性是iframe特有的属性,只有ie起作用,其属性值(即“true”)对于[color=red]不是必需的[/color],也就是说,对于iframe来说,alllowttow 这当然也表明,即使不定义值也有作用。 那么,[color=red]只要在iframe中输入“allowTransparency”即可变为[/color]。

也就是说:

iframe src=' iframe.html ' width=' 600 px ' height=' 500px ' allowtransparencyscrolling=' no ' frameborder='0'/io

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。