开发者

Internet Explorer 9 beta HTML5 video tag not supporting relative width/height?

Is it correct that IE9 (Beta & Preview) don't support relative width/height on the html5 video tag?

Chrome, Safari & Firefox all nicely accept a width=50%, but IE9 seems to read it as 50px. (Video is showing in all 4 browsers so no problem there).

I was wondering if it's a bug/feature yet to be implemented or permanent so开发者_如何学Pythonlution.

J.


Have you tried setting the height and width using CSS rather than the HTML element's attributes?

ie rather than:

<video src='whatever' height='50%' width='50%'>

you could try:

<video src='whatever' style='height:50%; width:50%;'>

...or, of course, put the styles into your separate CSS file.


I just installed the IE9 Release Candidate and since there's no change I guess we can call this their permanent solution.

Just to be complete: <video width="100%" height="100%"></video>

Will render as 100px width in IE9. In latest versions of Chrome, FireFox, Safari and Opera this will be rendered 100% width of the parent div.


I used CSS to style the tag for width:100% and height:100%. I tried IE9 Beta and that seemed to work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜