2014-04-29 39 views
0

所以我有這樣不能增加視頻元素的寬度

enter image description here

的情況下,正如你可以看到視頻沒有填滿元素的整個寬度。

這是我的HTML是什麼樣子 -

<div class="webcam"/> 
    <div class="control-container"> 
</div> 

視頻元素獲得通過使用JavaScript的網絡攝像頭庫的創建 -

https://github.com/jhuckaby/webcamjs

var that = this; 
Webcam.set({ 
    width: this.options.width, 
    height: that.options.height, 
    image_format: 'jpeg', 
    jpeg_quality: 100, 
    force_flash: false 
}); 
Webcam.attach('.webcam'); 

這是視頻elem看起來像

enter image description here

現在,寬度和高度都是562和344,這也是包含元素的寬度和高度。我試圖讓這些更大,但所發生的只是白色空間變大,而不是實際的實時查看器。

我該怎麼辦?

+0

編輯在打印屏幕代碼,並將其寫入 – Nickool

+0

如何無益 - 你在這說什麼? – praks5432

+0

:)我在說人們需要看到我想幫助的小文本不要忘了 – Nickool

回答

0

嘗試使用此代碼

.webcam { 
    width: 100% !important; 
    height: auto !important; 
} 
相關問題