框架页文件设置:
<body style="background-color:transparent" > 或 <body bgColor="transparent">
方法一:
<iframe src="about.htm" width="100%" height="100%" align="center" scrolling="auto" frameborder="0" style="filter:chroma(color=#ffffff)" >
</iframe>
缺点:iFrame里的白色的都变透明了。
方法二:(个人推荐使用)
<iframe src="about.htm" width="100%" height="100%" align="center" scrolling="auto" frameborder="0" allowTransparency="true" >
</iframe>
还有其它几个写法,可以比较一下:
<iframe src="about.htm" allowTransparency="true" style="background-color: green"> </iframe >
<iframe src="about.htm"> </iframe >
<iframe src="about.htm" style="background-color: green"> </iframe >
如何让iframe背景色透明
原创mb64390262217c2 博主文章分类:css ©著作权
©著作权归作者所有:来自51CTO博客作者mb64390262217c2的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:shiro的一些概念
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
HighCharts:设置背景色透明
设置背景色透明
HighCharts 初始状态 参数设置 背景色