0
     <div class="box1">
        <video   preload="auto" autoplay loop muted="muted" volume="0"> 
        <source src="videos/splash4.mp4" type="video/mp4"> 
        </video>
        </div>

**This is the css**

.box1{
width:100%;
height:800px;
}

那么如何让这个视频适合Div呢?像http://www.google.com/nexus/7/

4

3 回答 3

5

可能你可以只做css,比如:

video {
    width: 100% !important;
    height: auto !important;
}
于 2013-10-28T03:33:10.140 回答
0

HTML:

 <div class="box1">
        <video width=100%  preload="auto" autoplay loop muted="muted" volume="0"> 
            <source src="videos/splash4.mp4" type="video/mp4"> 
        </video>
 </div>

CSS:

.box1{
    width:100%;
    height:800px;
}
于 2013-10-28T03:44:27.233 回答
0

尝试这个

.box1 video{ 
   width: 100% !important;
   height: 100% !important;
}
于 2013-10-28T05:45:40.640 回答