Chrome html-video隐形开始播放,直到我滚动页面 [英] Chrome html-video invisible start playing until I scroll the page
本文介绍了Chrome html-video隐形开始播放,直到我滚动页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经建立了一个网站,试图将视频作为大背景图像播放。该元素在我开始滚动之前是不可见的。我没有javascript。
I have built a site trying to play a video as a big background image.The element is invisible until i start scrolling. I have no javascript.
<!DOCTYPE html>
<video class="background_video" poster="video/rain.jpg" autoplay muted="true" preload="auto" >
<source type="video/mp4" src="video/rain.mp4">
<source type="video/ogv" src="video/rain.ogv">
<source type="video/webm" src="video/rain.webm">
</video>
推荐答案
似乎是chrome的一个bug并使用了海报属性。在回复中发现js就是这个伎俩。
Seems to be a bug with chrome and use of the poster-attribute. Found the js in the reply on this one do the trick.
这篇关于Chrome html-video隐形开始播放,直到我滚动页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文