3

Is it currently possible to set the background color of HTML5 video elements effectively? About HTML5 Audio and Video points to the fact that you can style video tags with standard CSS, but in my experience this isn't fully working:

  • On Chrome 23 (Snow Leopard) adding a poster image attribute to the video tag removes the background color, without a poster image it works as you might expect
  • On Safari 5.1.7 everything works correctly
  • Perhaps unsurprisingly Mobile Safari on an iPad running iOS 5 is a law until itself. The background color will always be black, no matter what I do. Occasionally I might get a flash of the set css background color before the poster / video load. But even with an empty video tag, the background color won't display.

Anyone had any success setting a background color on iPad?

4

1 回答 1

2

请根据 HTML 5 on mobile safari参考我的问题。

似乎无法控制它,因为视频渲染通过浏览器委托给硬件,并显示在“上方”,因此控制它的 css 属性不会影响任何事情。

我的研究是几年前的,但不要认为从那以后有什么改变。

于 2012-11-23T12:00:03.240 回答