CSS3中,SVG 当做背景,如何修改其他状态的颜色值
Like This:
.icon {
background-color: red;
-webkit-mask: url(icon.svg) no-repeat 50% 50%;
mask: url(icon.svg) no-repeat 50% 50%;
}
and
.icon-blue {
-webkit-filter: hue-rotate(220deg) saturate(5);
filter: hue-rotate(220deg) saturate(5);
}
More View:?https://codepen.io/noahblon/post/coloring-svgs-in-css-background-images
当前页面是本站的「Baidu MIP」版。查看和发表评论请点击:完整版 »
因本文不是用Markdown格式的编辑器书写的,转换的页面可能不符合MIP标准。