2014-04-29 38 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; 
} 
相关问题