视频元素上出现不需要的边框 [英] Unwanted border appearing on video element

查看:304
本文介绍了视频元素上出现不需要的边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图摆脱此视频周围的边框 http://bit.ly/ZihaJV 这个想法是,视频播放在没有边框的白色背景上。问题可能是由于视频和播放器的大小的比率。

I'm trying to get rid of the border around this video http://bit.ly/ZihaJV The idea is that the video plays on a white background with no borders. The problem might be due to the ratio of the video and the size of the player.

我也发现这个帖子,但它不能解决问题。我甚至不能访问Flash编译swf。 ​​ videojs禁用黑色背景

I also found this post but it doesn't solve the problem. I don't even have access to Flash to compile the swf. videojs disable black background

使用一个白色边框围绕视频隐藏黑线出现可能是一个工作,但我遇到一个问题,因为视频需要响应。

Using a with a white border around the video to hide the black lines appearing might be a work around but I run into a problem because the video needs to be responsive.

实际的网页显示的边框比这个测试更多。很抱歉,我无法显示原始状态。

The actual webpage shows more borders than this testing one. Sorry but I can't show the original.

感谢您的任何帮助。

推荐答案

在所链接的视频中,视频顶部的边界线是视频文件本身的一部分,因此这是原始文件或您编辑它的方式的问题。 (我经常有视频的这个问题。很讨厌。)

In the video you linked to, the border line along the top of the video is part of the video file itself, so it's an issue with the original file or the way you edited it. (I often have this problem with videos. Quite annoying.)

使用CSS的快速可视化修复将是把视频的顶部向上拉一点,隐藏线在顶部:

A quick visual fix with CSS would be to pull the top of the video up a bit and hide the line at the top:

.video-js .vjs-tech {
    top: -2px;
}

.video-js {
    overflow: hidden;
}

但是,这有点厚脸皮。

这篇关于视频元素上出现不需要的边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆