* {
box-sizing: border-box;
}
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
svg.defs {
position: absolute;
width: 0;
height: 0;
}
.squircle {
width: 75vmin;
height: 75vmin;
background: url(https://source.unsplash.com/user/mkmueller/likes/1000x1000) center / cover, #aaa;
clip-path: url(#squircle);
}
.wrapper {
filter: drop-shadow(0 0 100px rgba(#000, .25));
}
<svg class="defs">
<defs>
<clipPath id="squircle" clipPathUnits="objectBoundingBox">
<path d="M .5 0 C .1 0 0 .1 0 .5 0 .9 .1 1 .5 1 .9 1 1 .9 1 .5 1 .1 .9 0 .5 0 Z" fill="#f00"/>
</clipPath>
</defs>
</svg>
<div class="wrapper">
<div class="squircle"></div>
</div>
clip-path
在这里有一个解决方案。对于复制这个图像的确切约束条件还不确定,但是这里有一个可以开始的游乐场:https://bennettfeely.com/clippy/ - Griffin