html5背景视频全屏

Moh*_*amy 6 html css video html5

我想在我的网站上制作html5背景视频.但我对IE和谷歌Chrome有一些问题..我已经在这里制作了实例 可以任何人请告诉我我的视频有什么问题我发现它在谷歌浏览器黑屏并且不在IE CSS中工作:

<section class="container-1140" id="mast" style="height: 775px;">

        <div style="overflow:hidden; background:url(http://riskeverything.us/wp-content/themes/risky/images/splash-home.jpg) no-repeat; background-size:cover;" id="mast_inner-1">

            <div id="mast_inner-2">

                <video loop="1" autoplay="1" id="mast_inner-2" class="_534g" style="display: block;" controls="true">

                    <source src="video/video.mp4"></source>
                    <source src="video/video.webmhd.webm"></source>
                    <img src="video/poster.jpg">

                </video>

            </div>

                </div>

    </section>
Run Code Online (Sandbox Code Playgroud)

HTML是:

<section class="container-1140" id="mast" style="height: 775px;">

        <div style="overflow:hidden; background:url(http://riskeverything.us/wp-content/themes/risky/images/splash-home.jpg) no-repeat; background-size:cover;" id="mast_inner-1">

            <div id="mast_inner-2">

                <video loop="1" autoplay="1" id="mast_inner-2" class="_534g" style="display: block;" controls="true">

                    <source src="video/video.mp4"></source>
                    <source src="video/video.webmhd.webm"></source>
                    <img src="video/poster.jpg">

                </video>

            </div>

                </div>

    </section>
Run Code Online (Sandbox Code Playgroud)

Ahm*_*ndy 0

你可以使用这个插件。它很简单,可以解决您的任务。

  • [请不要发布仅链接的答案](https://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers)。 (2认同)