ionic2:自定义SVG图标
我使用的是Ionic2我想使用我的图标,因为我使用的是Ionic图标我看到了以下链接:ionic2:自定义SVG图标,svg,ionic-framework,ionic2,Svg,Ionic Framework,Ionic2,我使用的是Ionic2我想使用我的图标,因为我使用的是Ionic图标我看到了以下链接: 但是我不能按照说明去做,我不明白什么是SVG图标,我不想制作图标,我把图标作为图像,我想使用它,有人能帮我吗 您只需将.svg更改为.png。将此添加到您的app.scss文件 ion-icon { &[class*="appname-"] { mask-size: contain; mask-position: 50% 50%; mask-r
但是我不能按照说明去做,我不明白什么是SVG图标,我不想制作图标,我把图标作为图像,我想使用它,有人能帮我吗 您只需将
.svg
更改为.png
。将此添加到您的app.scss
文件
ion-icon {
&[class*="appname-"] {
mask-size: contain;
mask-position: 50% 50%;
mask-repeat: no-repeat;
background: currentColor;
width: 1em;
height: 1em;
}
&[class*="appname-customicon1"] {
mask-image: url(../assets/img/customicon1.png);
}
}
使用
信用证:。您只需将
.svg
更改为.png
。将此添加到您的app.scss
文件
ion-icon {
&[class*="appname-"] {
mask-size: contain;
mask-position: 50% 50%;
mask-repeat: no-repeat;
background: currentColor;
width: 1em;
height: 1em;
}
&[class*="appname-customicon1"] {
mask-image: url(../assets/img/customicon1.png);
}
}
使用
信用证:。我有警告标签:(遮罩大小、遮罩位置、遮罩重复和遮罩图像)-->[scss]未知属性在app.scss文件中我无法在评论中上载图像,但这不是错误,只是警告scss不知道这些标签图标没有警告标签:(遮罩大小、遮罩位置、遮罩重复和遮罩图像)-->[scss]未知属性在app.scss文件中我无法在评论中上载图像,但这不是错误,只是警告scss不知道这些标记图标不会出现