Skip to content

Instantly share code, notes, and snippets.

@malipetek
Created November 1, 2022 19:05
Show Gist options
  • Select an option

  • Save malipetek/8515907058229ce32d09888c8f67edb9 to your computer and use it in GitHub Desktop.

Select an option

Save malipetek/8515907058229ce32d09888c8f67edb9 to your computer and use it in GitHub Desktop.
Video overlay for hiding pixelation on webpages
video-container {
position: relative;
}
.video-container:after {
display: block;
content: '';
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20mm" height="20mm" viewBox="0 0 20 20"><path d="M0 0h10v10H0zM10 10h10v10H10z" style="stroke-width:.050089"/></svg>');
background-size: 2px;
}
@malipetek
Copy link
Copy Markdown
Author

Put your video inside the container with 0.5 of the size of container resolution. Add this overlay and your pixelation does not look like pixelation but a darkening effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment