关于ionic 打包后 background-image 无法显示 的问题
2017-03-20 09:50
525 查看
这几天费劲心思,终于把ionic 项目打包生成 本地app,但是安卓手机安装以后,我所有的雪碧图的 icon ,竟然无法显示;到处搜索答案,都没有什么可行的,都是说什么ionic版本不对,android手机版本不兼容。
最后,在stack overflow 上,尝试了 RILEY 这个位哥们的回答,确实完美的解决了这个问题:
Its not the size of the image that prevents it from displaying in ionic2.This is what you should do when the local image is not displaying:
remove the trailing ../ before your image folder or image name.The App already knows that all image are stored by default in the www folder.So you will have to use a format like this for all your images to display: Fir icons: and for background
意思是说本地app已经知道所有图片默认的存储路径是www 文件夹下,并不需要使用相对路径;所以解决方法是去掉 ../;
这是纠结了一下午的问题,记录下来,希望也对大家有所帮助!
最后,在stack overflow 上,尝试了 RILEY 这个位哥们的回答,确实完美的解决了这个问题:
Its not the size of the image that prevents it from displaying in ionic2.This is what you should do when the local image is not displaying:
remove the trailing ../ before your image folder or image name.The App already knows that all image are stored by default in the www folder.So you will have to use a format like this for all your images to display: Fir icons: and for background
image;
意思是说本地app已经知道所有图片默认的存储路径是www 文件夹下,并不需要使用相对路径;所以解决方法是去掉 ../;
这是纠结了一下午的问题,记录下来,希望也对大家有所帮助!
相关文章推荐
- 关于使用了QtWebKit的PyQt程序打包后无法显示网页图片的问题(Mac0S和windows)
- 关于label.setIcon(new ImageIcon("xxx.jpg"));无法显示问题
- 关于最近出现的病毒导致桌面无法显示的问题
- <input type="button">的style属性background-image无法在xp中正常显示
- 关于CSS中内层使用float导致外层的背景无法显示的问题的解决方法
- 解决关于vs2010中"w"无法 显示的问题
- 关于博客无法正确显示后台信息的问题
- 关于TreeView控件发布后无法显示展开图标的问题
- 关于CSS中内层使用float导致外层的背景无法显示的问题的解决
- 关于系统托盘图标(systemtray)无法显示问题的解决
- 关于CSDN登录时,图片检验码无法显示的问题处理
- 关于chm无法显示的问题(已解决)
- 关于GLSurfaceView无法显示的问题
- 关于使用Adoeb SVG Viewer在IE中无法正常显示SVG文档的问题
- 关于win32绘图出现无法显示彩色问题的解决
- [转]外部css文件中的 BACKGROUND-IMAGE: url(../image.gif)指定的背景图像无法显示,谁有好主意?
- 解决 WinForm 中 TreeView 的 StateImageList 实际显示大小无法改变的问题
- 关于background-image引发的问题
- 关于图片在窗体显示后,无法更新或删除的问题
- 关于开机显示GRUB 无法正常进入系统的问题