如何让Flash不遮挡HTML div元素的技巧

2020-04-16 21:57:22易采站长站整理

document.write(‘<embed src="http://img.jb51.net/image/22cn_jb51net.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="250" wmode="opaque"></embed>’);   
document.write(‘</object>’);   
</script>  
</div>  
<div id="div2">  
<a href="http://i.am.cn/?s=jb51pic2" target="_blank"><img src="http://huoche.7234.cn/images/jb51/vxoqdvfez0e.png" width="300" height="250"/></a>  
</div>  
</div>  
</body>  
</html>  

标准的的Flash插入

XML/HTML Code复制内容到剪贴板

<!– 标准的的Flash插入   
设置高度与宽度:   
width="400" height="400"  
设置路径:   
data="style/flash/001.swf" 与 value="style/flash/001.swf"  
替代文本或替代图片:   
<a href="" title=""><img src="" alt="" /></a> 也可以不要这段   
–>  
<object type="application/x-shockwave-flash" data="style/flash/001.swf" width="400" height="400">  
<param name="movie" value="style/flash/001.swf" />  
<a href="style/flash/001.swf"><img src="style/img/001.jpg" alt="Flash动画" /></a>  
</object>  

不会遮住层的Flash

XML/HTML Code复制内容到剪贴板

<!– 不会遮住层的Flash    
让Flash不档住浮动对象或层的关键属性:   
<param name="wmode" value="opaque" />  
<embed wmode="opaque"></embed>  
–>  
<object type="application/x-shockwave-flash" data="style/flash/001.swf" width="400" height="400">  
<param name="movie" value="style/flash/001.swf" />  
<param name="wmode" value="opaque" />  
<embed wmode="opaque"></embed>  
<a href="style/flash/001.swf"><img src="style/img/001.jpg" alt="Flash动画" /></a>