【参加讨论】 将flash插入网页的时候,我们有时候会需要将它设为透明,有时候我们需要在flash的背面插入一些漂亮的图片,搭配出漂亮的效果……下面我们介绍一些将flash插入网页中的一些透明的设置技巧。 一、swf透明、无坐标控制
首先教大家最简单的插入flash的代码,透明,无坐标控制:
注意wmode="transparent"是控制flash是否透明显示的,如果不想让它显示为透明的,直接把wmode="transparent"去掉即可。
<embed height=60 pluginspage=http://www.macromedia.com/go/getflashplayer src="http://www.iyit.net/files/beyondpic/2006-9/29/0692916570371093.swf" type=application/x-shockwave-flash width=468 wmode="transparent" quality="high"></embed> |
二、swf透明、绝对坐标控制
再教教大家加入绝对坐标的透明flash,绝对坐标意味着不管你的窗口拉多大,那个flash依然乖乖地在原地不动。
<embed style="left: 60px; width: 468px; position: absolute; top: 200px; height: 1000px" align=right src="http://www.iyit.net/files/beyondpic/2006-9/29/0692916570371093.swf" width=568 height=60 type=application/octet-stream ;; quality="high" wmode="transparent">
|
三、swf透明、相对坐标控制
最后教教大家如何加入相对坐标的透明flash。
注意下面代码的table部分,这主要是使用表格作为容器,把flash“装”到表格里,这样不管浏览者把浏览器拉多大,flash永远和表格一起动。而且,表格可以设置背景图片,表格上面再放一个透明flash与背景图片相配合,效果很好。
<table border="0" cellpadding="0" cellspacing="0" width=600 height=382 align=center background=/xkerfiles/uppic/2006-9/4/backgroud.jpg> <td width=600 height=382><embed pluginspage=http://www.macromedia.com/go/getflashplayer src="http://www.iyit.net/files/beyondpic/2006-9/29/0692916570371093.swf" width="100%" height="100%" type=application/x-shockwave-flash wmode="transparent" quality="high"></embed></td></td></table>
|