开发者

Flash with video fallback AND valid html5?

I'm trying to have a flash video, with fallback to the h开发者_如何学Gotml5 video element for those browsers which don't support flash, such as iPhone. I'd also like to have valid html5.

The issue I see is that in html5, object doesn't support the classid attribute anymore, but this would be required for a user to get flash if they don't have it but want it.

It seems my options are to accept invalid html5 but not have the flash work properly, or have the classid and not have valid html5.

Anyway to have it all? I must be missing something!


You could exclude the classid for every browser except IE using conditionals as other browsers work fine without it. The validator would ignore the version with the classid included and just read the HTML 5 valid version.

 <!--[if IE]> <object id="flashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="90" height="90" ><![endif]-->

<!--[if !IE]>--><object id="flashID" width="90" height="90"> <!--<![endif]-->

It's not pretty but if validation is essential it would work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜