<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
:root {
  --bg1: radial-gradient(
    circle at center,
    #000, #000 10%,
    transparent 10%, transparent 20%, 
    #000 20%, #000  30%, 
    transparent 30%, transparent 40%, 
    #000 40%, #000  50%, 
    transparent 50%, transparent 60%, 
    #000 60%, #000  70%, 
    transparent 70%, transparent 80%, 
    #000 80%, #000  90%, 
    transparent 90%, transparent 100%
  );
  --bg2: linear-gradient(
    to bottom,
    #000, #000 10%,
    transparent 10%, transparent 20%, 
    #000 20%, #000  30%, 
    transparent 30%, transparent 40%, 
    #000 40%, #000  50%, 
    transparent 50%, transparent 60%, 
    #000 60%, #000  70%, 
    transparent 70%, transparent 80%, 
    #000 80%, #000  90%, 
    transparent 90%, transparent 100%
  );
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  padding: 10px;
  place-items: center;
}
div {
  min-height: 300px;
  min-width: 300px;
  mask-repeat: no-repeat;
  border: 1px solid #efefef;
  padding: 2px;
  border-radius: 4px;
  box-shadow: 0px 0px 2px rgba(0,0,0,.3);
}

div:nth-child(1) {
  background: url('//www.w3cplus.com/sites/default/files/blogs/2019/1905/3-1G11R02533.jpg') no-repeat;
}

div:nth-child(2) {
  background: var(--bg1);
}

div:nth-child(3) {
  background: var(--bg2);
}

div:nth-child(4) {
  background: url('//www.w3cplus.com/sites/default/files/blogs/2019/1905/3-1G11R02533.jpg') no-repeat;
  mask-image: var(--bg1), var(--bg2);
  mask-composite: add;
  mask-composite: source-over;
}

div:nth-child(5) {
  background: url('//www.w3cplus.com/sites/default/files/blogs/2019/1905/3-1G11R02533.jpg') no-repeat;
  mask-image: var(--bg1), var(--bg2);
  mask-composite: subtract;
  mask-composite: source-out;
}


div:nth-child(6) {
  background: url('//www.w3cplus.com/sites/default/files/blogs/2019/1905/3-1G11R02533.jpg') no-repeat;
  mask-image: var(--bg1), var(--bg2);
  mask-composite: intersect;
  mask-composite: source-in;
}

div:nth-child(7) {
  background: url('//www.w3cplus.com/sites/default/files/blogs/2019/1905/3-1G11R02533.jpg') no-repeat;
  mask-image: var(--bg1), var(--bg2);
  mask-composite: exclude;
  mask-composite: xor;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.