2015-04-26 82 views
0

我有一段視頻,意思是在所有屏幕尺寸(xs除外)中出現在4列以上。下面的代碼不響應,顯示視頻非常大。把我的頭髮撕掉,需要幫助!爲什麼我的嵌入式響應式視頻不響應?

<div class="hidden-xs col-sm-4 embed-responsive-16by9"> 
    <video class="embed-responsive-item" title="Former Balmain Massage therapist Blaise Bowling shows the ins and outs of pregnancy massage" poster="../../images/blaises_pregnancy_poster.jpg" controls src="../../video/pregnancy360.mp4" type="video/mp4"> 
</video> 
</div> 

的原始視頻是勉強爲360px寬,它的渲染實在太大......該網頁是在https://balmainmassage.com.au/2015/modalities/pregnancy.html

感謝

克勞迪奧

回答

0

在你html,我假設你有這在你的<head>

<head> 
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 
</head> 

你應該把你的視頻在<div>是這樣的:

<div class="responsive_video">        
<video src="yourfolder/yourvideo.mp4" controls="controls" type="video/mp4" </video>  
</div> 

然後,你應該在你css的底部有這下你@media only screen and (max-width : 960px)

@media only screen and (max-width : 960px) { 

    .responsive_video video{ 
     width:100%; 
       } 
}