Home > Net >  How to fix meaningless white space in video frame?
How to fix meaningless white space in video frame?

Time:07-05

Screenshot Hello everyone, I need your help to fix this interesting white space. Why does it look this?

CodePudding user response:

Set the border-width to an even number, so instead of this:

#video_1 {
    /* ... */
    border-radius: 15px;
    border-style: solid;
    border-width: 5px;
    /* ... */
}

Instead use something like 4px instead of 5px:

#video_1 {
    /* ... */
    border-radius: 15px;
    border-style: solid;
    /* like this */
    border-width: 4px;
    /* ... */
}

CodePudding user response:

You are seeing a sort of edge effect where the system is struggling to match part CSS pixels to the multiple screen pixels that make up one CSS pixel on modern displays.

If you put a background to the video the same coloring as the border it will 'fill up' the little gap.

background-color: rgba(255, 181, 147, 0.814);
  • Related