我从thenounproject.com获取我的SVG图标,但是无法更改它们的颜色,因为填充没有任何效果。
我正在使用Ruby on Rails,所以我使用了<%= image_tag('#'), :class => "tomatoe" %>
我的CSS如下:
.tomatoe{
@include transition-property(all);
@include transition-duration(1s);
fill: white;
width: 100px;
margin-top: 1em;
}
无论如何,Fill功能都无法正常工作。我在几个SVG文件上尝试过,但是一直没有成功,而且我也不知道原因。