视频播放器显示黑色边框 [英] Video player shows black border

查看:100
本文介绍了视频播放器显示黑色边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是HTML5视频播放器,它可以正常工作,但是它在右侧显示了一个1/2像素的边框.我已经检查是否是因为视频本身,并且我尝试设置

I use a HTML5 video player and it works, but it shows a 1/2 pixel border on the right side. I already checked if it was because the video itself and I tried to set

border:solid 0px black;

但是没有帮助.

我当前的代码:

<video id="video" autoplay>
  <source src="intro.mp4" type="video/mp4" id="video">
  Your browser does not support the HTML5 player.
</video>

和样式

#video{
    width:80%; right: 0; top: 0;
    display:none;
    border:solid 0px black;
}

产生

如果有人可以帮助我,我会很高兴:D

If someone could help me out, I would be really happy :D

谢谢

推荐答案

没有一个是正确的.这是重点.您需要这样做:

NONE of this is right. This is a focus thing. You need to do:

video:focus { outline:none; }

//或选择颜色或透明色或其他,如果您需要关注ADA/WCAG的合规性.

// or choose a color or transparent or something other if you are needing the focus for ADA/WCAG compliance.

这篇关于视频播放器显示黑色边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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