我try 使用线性渐变,但无法在左上角实现边界半径.
.img-container {
background-image: url('https://loremflickr.com/680/520/car,forest');
background-repeat: no-repeat;
background-size: cover;
border-radius: 0px 42px 42px 4px;
position: relative;
width: 600px;
height: 320px;
background-position: 100%;
}
.img-container::before {
content: '';
position: absolute;
left: 0;
top: -4px;
width: 182px;
height: calc(100% + 2px);
background: linear-gradient(to top left, transparent 50%, white 50.1%)
bottom left / 182px no-repeat transparent;
}
<div class="img-container"></div>