<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
display: grid;
grid-template-columns: repeat(4, 400px);
gap: 10px;
padding: 10px;
place-items: center;
}
div{
width: 400px;
height: 688px;
background: url('//www.w3cplus.com/sites/default/files/blogs/2019/1905/mask-clip-path-1.png') no-repeat;
background-size: 400px 688px;
position: relative;
&::after {
content: '';
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
&:not(:first-child)::after {
background: rgba(0,0,0,.65);
}
}
div:nth-child(2) {
&::after {
background: rgba(0,0,0,.65);
}
}
div:nth-child(3) {
&::after {
background: radial-gradient(circle at 368px 308px, transparent,transparent 30px, rgba(0, 0, 0, 1) 30px, rgba(0, 0, 0, 1) 100%) no-repeat;
background-size: 440px 688px;
}
}
div:nth-child(4) {
&::after {
background: radial-gradient(circle at 368px 308px, transparent,transparent 30px, rgba(255,255, 255, 1) 30px, rgba(255, 255, 255, 1) 100%) no-repeat;
background-size: 440px 688px;
}
}
div:nth-child(5),
div:nth-child(6){
&::after {
mask: radial-gradient(circle at 368px 308px, transparent,transparent 30px, rgba(0, 0, 0, 1) 30px, rgba(0, 0, 0, 1) 100%) no-repeat;
mask-size: 440px 688px;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.