I am trying to show a video with rounded corners, but on the bottom corners, it is pixalated (as showen on the attached screenshot).
This is the HTML code I have tried:
<div class="container1">
<video src="Videos/Film 1.mp4" poster="Thumbnails/Film 1.jpg" class="video1" id="video1" onclick="controlsChangeVideo1()"></video>
</div>
And this the CSS:
.container1 {
margin-left: 50px;
margin-right: 425px;
margin-top: 50px;
border-radius: 20px;
overflow: hidden;
}
2
Answers
You can try this code for a more precise result.
HTML
`
`
CSS
`
`
This is because the size of the container does not actually match the size of the video. To make the container match the size of the video player you could use
min-content
.However, if you add a border to the container, you will notice a extra space below the video. The reason of this is because
video
is defaulted toinline
display, causing the extra space based on theline-height
. The suggested way to remove this space is to make the videodisplay:block
.