我已經從icomoom下載了一些圖標,但圖標背景顏色是黑色和白色。我想給我自己的顏色。可以任何身體請告訴我該怎麼辦?如何更改iconmoon圖標的圖標顏色
當我下載圖標,我得到了下面的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";
}
你能提供一些你的CSS代碼嗎? – arnold
@arnold我已經添加了css文件,請看看 – rocking
然後將'color'屬性更改爲圖標......將它們視爲文本。 (又名:如果你寫'color:red;'他們會變成紅色的) – drip