1.img标签的style属性中:filter:drop-shadow
重要代码:
marginLeft: -36,filter:'drop-shadow(36px 0px white)'
2.使用 mask-image 属性, 实现效果
.imagebox {
-webkit-mask-image: url("../../assets/icon/minu.png");
mask-image: url("../../assets/icon/minu.png");
width:50px;
height:50px;
background:${color};
mask-size: contain;
mask-position: center;
mask-repeat: no-repeat;
-webkit-mask-size: contain;
-webkit-mask-position: center;
-webkit-mask-repeat: no-repeat;
}
3.filter属性配合invert()、grayscale()、sepia()或hue-rotate()函数来改变png颜色