clip-path: polygon矩形切角
2023-02-27 本文已影响0人
逸笛
两个切角
图片.png .cover {
width: 210rpx;
height: 150rpx;
clip-path: polygon(0 8px,
8px 0,
calc(100% - 8px) 0,
100% 8px,
100% calc(100% - 8px),
100% 100%,
0 100%,
0 calc(100% - 8px));
}
四个切角
图片.png
clip-path: polygon(0 8px,
8px 0,
calc(100% - 8px) 0,
100% 8px,
100% calc(100% - 8px),
calc(100% - 8px) 100%,
8px 100%,
0 calc(100% - 8px));