我的实现思路是上下两个一个为:before 一个是 after,所以直接上代码了
@mixin edgeStyle {
width: 15px;
height: 15px;
z-index: -1;
content: '';
position: absolute;
}
(你的父级DIV CLASS)::after {
@include edgeStyle();
background-image: radial-gradient(15px at top left, transparent 15px, #ffffff 10px, #ffffff );
top: -15px;
right: 0px;
}
(你的父级DIV CLASS)::before {
@include edgeStyle();
background-image:
radial-gradient(15px at bottom left, transparent 15px, #ffffff 10px, #ffffff );
bottom: -15px;
right: 0px;
}
在他们的父级div上给一个相对定位就ok了