一些ionicons不显示 [英] some ionicons not showing

查看:1710
本文介绍了一些ionicons不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经注意到一些我用我的科尔多瓦项目中的图标没有我的任何设备上显示。那些没有工作的那些似乎有字iOS和Android在图标名称(如:离子机器人列表或离子IOS-书大纲)。任何想法,为什么他们只是显示空白?到目前为止,我已经使用一个通用名称的任何图标正常工作(如离子时钟,离子卡)。该图标的名称,我从这里获取: ionicons

我在index.html文件包含这样的:

 <链接HREF =LIB /离子/ CSS / ionic.css相对=样式>
 

解决方案

离子通过构建离子的应用程序时,显然,最新的版本离子启动从CMD加载一个过时的图标库V1.5.2(最新的V2.0.0)。

  • 要更新的字体到最新的ionicons网站和下载。
  • 解压缩,然后导航到/字体目录和这4个文件复制到www / lib目录/离子/字体您的应用程序(覆盖)的目录。
  • 请同为SCSS文件夹并粘贴到www / lib目录/离子/ SCSS / ionicons(覆盖)。
  • 最后从提取的zip文件/css/ionicicons.css打开ionicons.css文件,该文件的内容复制到www / lib目录/离子/ CSS / ionicons.css(注意:请确保您编辑和只替换现有的字体版本占地约第2000至00年线,你会看到一个指示评论)

I have noticed that some of the icons I am using in my cordova project are not displaying on any of my devices. The ones that aren't working seem to have the word ios or android in the icon name (eg: ion-android-list or ion-ios-book-outline). Any ideas why they are just showing up blank? So far any icon I have used with a generic name works fine (eg ion-clock, ion-card). The icon names I am fetching from here: ionicons

I have included this in my index.html file:

<link href="lib/ionic/css/ionic.css" rel="stylesheet">

解决方案

Apparently the latest version of ionic when building an ionic app using ionic start from CMD loads an outdated icon library v1.5.2 (latest is v2.0.0).

  • To update the fonts go to the latest ionicons site and download.
  • Unzip and navigate to the /fonts dir and copy these 4 files to the www/lib/ionic/fonts dir of your app (overwrite).
  • Do the same for the scss folder and paste to www/lib/ionic/scss/ionicons (overwrite).
  • Lastly open the ionicons.css file from your extracted zip file /css/ionicicons.css and copy the contents of that file to www/lib/ionic/css/ionicons.css (NOTE: Make sure you edit and only replace the existing font version takes up about the first 1500 - 2000 lines, you will see the comments indicating)

这篇关于一些ionicons不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆