<img src="https://picsum.photos/id/117/300/300" >
<img src="https://picsum.photos/id/296/300/300" >
img {
--s: 20px; /* control the size of the wave */
--w: 350px; /* preferred image width */
width: round(var(--w),4*var(--s));
aspect-ratio: 1;
box-sizing: border-box;
--_g:conic-gradient(#000 0 0) no-repeat 50%/;
mask:
radial-gradient(var(--s),#000 100%,#0000 calc(100% + 1px))
0 0/calc(4*var(--s)) calc(4*var(--s)),
var(--_g) calc(100% - 6*var(--s)) calc(100% - 6*var(--s)),
var(--_g) calc(100% - 4*var(--s)) calc(100% - 4*var(--s)) intersect,
radial-gradient(var(--s),#0000 calc(100% - 1px),#000)
var(--s) var(--s)/calc(2*var(--s)) calc(2*var(--s));
}
body {
margin: 0;
min-height: 100vh;
display: grid;
place-content: center;
grid-auto-flow: column;
background: #F2E9E1;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.