在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