Chrome html-video invisible start playing until I scroll the page [closed]

和自甴很熟 提交于 2019-12-11 20:23:46

问题


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>

回答1:


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.

video disappears when poster attribute and preload is defined



来源:https://stackoverflow.com/questions/13340763/chrome-html-video-invisible-start-playing-until-i-scroll-the-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!