视频播放器显示黑色边框

时间:2013-12-25 10:53:16

标签: css html5 video

我使用HTML5视频播放器并且它可以工作,但它在右侧显示1/2像素边框。 我已经检查过是否因为视频本身和我试图设置

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;
}

结果

enter image description here

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

由于

4 个答案:

答案 0 :(得分:2)

从此开始(黑色视频边框):

enter image description here

为此(无黑色边框):

enter image description here

通过添加:

<video widht="103%" style="margin-left: -3px">

答案 1 :(得分:2)

没有一个是对的。这是重点。您需要这样做:

     //Load user /password in runtime
            services.AddTransient<IResourceOwnerPasswordValidator, DBResourceOwnerPasswordValidator>();

///verify by clientid & client secrect in mssql 

services.AddTransient<IClientStore, DbClientStore>(); 

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

答案 2 :(得分:0)

这实际上是一个众所周知的问题。修复一点隐藏即可解决-> 给父元素包裹视频溢出:隐藏 视频(相对/绝对位置)向左:1px。

赞:

HTML:

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

Css:

.video-wrapper{
    overflow: hidden
}

.video-wrapper #video{
    position: relative; /* could be absolute if needed */
    left: 1px;
}

答案 3 :(得分:-1)

怎么样:

border: none !important;

如果这不起作用,请尝试添加:

border-right: none !important;

如果这些没有帮助,请向我们展示您的网站