Css 从html5视频中删除黑色背景。出现一秒钟
如何从html5视频中删除黑色背景?加载时,它会出现几秒钟。使用CSS不起作用 HTML:Css 从html5视频中删除黑色背景。出现一秒钟,css,html,video,html5-video,Css,Html,Video,Html5 Video,如何从html5视频中删除黑色背景?加载时,它会出现几秒钟。使用CSS不起作用 HTML: <div id="start-screen"> <video id="video-element"> <source src="video-mp4.mp4" type="video/mp4"> <source src="video-oggtheora.ogv" type="video/ogg"> </video> <
<div id="start-screen">
<video id="video-element">
<source src="video-mp4.mp4" type="video/mp4">
<source src="video-oggtheora.ogv" type="video/ogg">
</video>
</div>
谢谢 我没有找到CSS的有效解决方案。但我发现,使用一个非常小的白色(或任何你想要的颜色)海报图像就可以做到这一点。如果你有同样的问题,我就是这么做的。我刚刚使用了一个100x100px的PNG文件(大小约1KB)
玩得开心 这只是我在IE中遇到的一个问题。不幸的是,这在IE11中不起作用。
#start-screen, video-element {
background-color: #fff !important;
}
<div id="start-screen">
<video id="video-element" poster="/images/white-poster-image.png">
<source src="video-mp4.mp4" type="video/mp4">
<source src="video-oggtheora.ogv" type="video/ogg">
</video>
</div>