flash在div overflow hidden的显示问题

昨天在做项目的时候,要用到一个别的网站的flash(同一家公司的两个网站,所以没有版权问题)。拿到flash的时候,发现这个flash的底部有一条白边:



准备用一个div把这个flash object 包起来,然后设定高度和overflow:hidden把这个白边隐藏掉,在ie下可以,但在firefox下flash会穿越div。

经过一番搜索,找到原因,其实很简单,只要在embed tag上加个属性wmode="transparent" 就解决了,wmode是什么意思呢?官方文档上是这么写的:
  • wmode - Possible values: window, opaque, transparent. Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser.
    • window - movie plays in its own rectangular window on a web page.
    • opaque - the movie hides everything on the page behind it.
    • transparent - the background of the HTML page shows through all transparent portions of the movie, this may slow animation performance.

关于flash的所有参数,可以参阅:http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701

最后,flash显示效果:

posted @ Tuesday, March 31, 2009 9:35 AM

Print

Comments on this entry:

# re: flash在div overflow hidden的显示问题

Left by 愚人码头 at 4/10/2009 9:08 AM
Gravatar
大哥,您的链接已经做好了,请把我的链接也放上去,谢谢
WEB前端开发 http://www.css88.com

Your comment:



 (will not be displayed)


 
 
 
Please add 2 and 2 and type the answer here:
 

Live Comment Preview:

 
View posts by date
«March»
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910