视频作为div标签HTML中的背景

时间:2014-08-14 01:53:44

标签: html html5 video

我试图将视频作为div(如在(plated.com)中使用的背景)这里是我得到的我无法在div中获取视频,它继续全屏显示。

             <section>
                <div id="video-container">
                    <video id="bgvid" autoplay poster="images/logo.png" muted>
                        <source src="videos/allyouneed.mp4" type="video/mp4"/>
                    </video>
                </div>
            </section>



       #video-container{
    position: absolute;
    min-width: 100%;
    max-height: 500px; 
    border: 2px green solid;


}
video#bgvid{
    position: relative;
    min-width: 100%;
    min-height: 100%;
    z-index: -100;

0 个答案:

没有答案