.colorful {display: inline-block;width: 32px; height: 32px;background-color: #f4615c; // 目标颜色、目标颜色、目标颜色-webkit-mask: url(jgy_wxz_dt.svg) no-repeat;mask: url(jgy_wxz_dt.svg) no-repeat;-webkit-mask-size: 100% 100%;mask-size: 100% 100%;}
适用于svg,png
/wordpress//11/css-change-icon-color/ 参考网址学习
.colorful {display: inline-block;width: 32px; height: 32px;background-image: url(..png), linear-gradient(#f4615c, #f4615c);background-blend-mode: lighten;background-size: 100%;}