css小三角定位到盒子上怎么让盒子阴影环绕小三角和盒子

css小三角定位到盒子上怎么让盒子阴影环绕小三角和盒子,在线等
css小三角定位到盒子上怎么让盒子阴影环绕小三角和盒子,在线等

img

使用filter:drop-shadow();

<div class="f"></div>

.f{
            background:#fff;
            filter:drop-shadow(2px -2px 3px #333);
            width:120px;
            height:120px;
            border-radius:12px;
            position:relative;
        }
        .f:after{
            content:'';
            display:block;
            width:16px;
            height:16px;
            background:#fff;
            position:absolute;
            border-radius:4px;
            transform: rotateZ(45deg);
            top:-7px;
            right:20px;
        }

有问题随时骚扰

两个都加盒子阴影,给小三角加一个z-index:10;试试