I am trying to create a "focus" effect with CSS. I have managed to add some background color and use radial-gradient to create almost what I want. See the pen below (in the pen I used an img instead of a video for simplicity):
<div class="focus" />
<video src="https://some-video" />
.focus {
top:0;
left:0;
position:fixed;
z-index:100;
height:100vh;
width:100vw;
background: radial-gradient(
circle at 50% 50%,
transparent 150px,
rgba(0, 0, 0, 0.9) 160px
);
}
Is there a way to add a blur filter instead of opacity?
I found this, but as mentioned in the comment on that answer, I would like a solution that would allow for dynamic content without replicating html tags (wouldn't like to have to deal with 2 video elements...)