问题
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