在Chrome和Safari浏览器中删除html5视频顶部和底部的黑色条 [英] Removing the black bar on top and bottom of html5 videos in Chrome and Safari browsers
本文介绍了在Chrome和Safari浏览器中删除html5视频顶部和底部的黑色条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是html5视频。在FireFox中,它运行良好,但在Chrome和Safari浏览器中,它显示出一个厚厚的黑色条形顶部和底部。如何摆脱这个障碍?
I am using html5 video. In FireFox it is running well but in chrome and safari, it is showing a thick black bar top and bottom. How to get rid of this bars?
代码,
<video autoplay loop="loop" onended="this.play()" width="100%">
<source src="videos/video.mp4" type="video/mp4"/>
<source src="videos/video.webm" type="video/webm" />
</video>
预先致谢
Thanks in advance
推荐答案
查看包含视频标签的标签的尺寸和/或CSS。这可能是一个分区。我有一个身高:100%。一旦我删除它,它解决了问题。
Take a look at the dimensions and/or CSS of the tag containing your video tag. That will probably be a div. I had one with height:100%. Once i removed it, it solved the problem.
希望它有帮助。
这篇关于在Chrome和Safari浏览器中删除html5视频顶部和底部的黑色条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文