1、白底小图标换色
.iconBox { position: relative; width: 19px; height: 19px; overflow: hidden; // 隐藏原本颜色的图片 .icon { position: absolute; left: -100%; width: 19px; height: 19px; filter: drop-shadow(19px 0 0 red); } }
隐藏前:
隐藏后:
标签:技巧,记录,height,width,19px,position,隐藏,css From: https://www.cnblogs.com/atao24/p/17137122.html