我已经从icomoom 下载了一些图标。但是图标背景颜色是黑色和白色。我想给自己的颜色。任何人都可以告诉我该怎么做吗?
当我下载图标时,我得到了以下style.css
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot?-haa506');
src:url('fonts/icomoon.eot?#iefix-haa506') format('embedded-opentype'),
url('fonts/icomoon.woff?-haa506') format('woff'),
url('fonts/icomoon.ttf?-haa506') format('truetype'),
url('fonts/icomoon.svg?-haa506#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"], [class*=" icon-"] {
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-home:before {
content: "\e600";
}
.icon-images:before {
content: "\e601";
}
.icon-pawn:before {
content: "\e602";
}
最佳答案
图标应被视为文本。
如果你给它们涂上颜色。它们会改变颜色。
例子:
.icon-pawn { color: red; }
关于css - 如何更改 icomoon 图标的图标颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21661087/