开发者

Object tag HTML5 using swfobject disappears

I am trying to switch my doctype to HTML5 to play around with some of the new stuff, but I am running into an issue with flash.

The following code works ONLY when the doctype is set to PUBLIC "-//W3C//DTD HTML 开发者_Go百科4.0 Transitional//EN". When I switch it to just HTML, it works in chrome, doesn't work at all in Firefox, and renders a small crappy looking thing in IE9.

<!DOCTYPE HTML> <!-- PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" -->
<html>
<head>

</head>
<body>
    <object 
    width="165" 
    height="100%" 
    type="application/x-shockwave-flash" 
    data="http://www.example.com/movie.swf" 
    id="leftNavigation" 
    style="visibility: visible;">
<param name="menu" value="false">
<param name="wmode" value="transparent">
<param name="base" value="http://www.example.com/">
<param name="tabindex" value="0">
<param name="salign" value="LT">
<param name="bgcolor" value="#002851">
<param name="flashvars" value="foo=bar;blah=blahbity;">
</object>
</body>
</html>

Literally just switching the doctype makes it work.

Any ideas???


So, I ended up figuring this out late late last night after banging my head on my desk for a few hours.

Turns out....height="100%" screws the thing up...Take that out, and make sure CSS doesn't have height 100% either...

I removed that attribute and all was fine!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜