# Ionicons
[Ionicons](http://ionicons.com/) is a completely open-source icon set with 1,100+ icons crafted for web, iOS, Android, and desktop apps. Ionicons was built for [Ionic Framework](https://ionicframework.com/), so icons have both Material Design and iOS versions.
Note: All brand icons are trademarks of their respective owners. The use of these trademarks does not indicate endorsement of the trademark holder by Ionic, nor vice versa.
We intend for this icon pack to be used with [Ionic](http://ionicframework.com/), but it’s by no means limited to it. Use them wherever you see fit, personal or commercial. They are free to use and licensed under [MIT](http://opensource.org/licenses/MIT).
## Contributing
Thanks for your interest in contributing! Read up on our guidelines for
[contributing](https://github.com/ionic-team/ionicons/blob/master/.github/CONTRIBUTING.md)
and then look through our issues with a [help wanted](https://github.com/ionic-team/ionicons/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
label.
## Using the Web Component
The Ionicons Web Component is an easy and performant way to use Ionicons in your app. The component will dynamically load an SVG for each icon, so your app is only requesting the icons that you need.
Also note that only visible icons are loaded, and icons which are "below the fold" and hidden from the user's view do not make fetch requests for the svg resource.
### Installation
If you're using [Ionic Framework](https://ionicframework.com/), Ionicons is packaged by default, so no installation is necessary. Want to use Ionicons without Ionic Framework? Place the following `<script>` near the end of your page, right before the closing </body> tag, to enable them.
```html
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
```
### Basic usage
To use a built-in icon from the Ionicons package, populate the `name` attribute on the ion-icon component:
```html
<ion-icon name="heart"></ion-icon>
```
### Custom icons
To use a custom SVG, provide its url in the `src` attribute to request the external SVG file. The `src` attribute works the same as `<img src="...">` in that the url must be accessible from the webpage that's making a request for the image. Additionally, the external file can only be a valid svg and does not allow scripts or events within the svg element.
```html
<ion-icon src="/path/to/external/file.svg"></ion-icon>
```
## Variants
Each app icon in Ionicons has a `filled`, `outline` and `sharp` variant. These different variants are provided to make your app feel native to a variety of platforms. The filled variant uses the default name without a suffix. Note: Logo icons do not have outline or sharp variants.
```html
<ion-icon name="heart"></ion-icon> <!--filled-->
<ion-icon name="heart-outline"></ion-icon> <!--outline-->
<ion-icon name="heart-sharp"></ion-icon> <!--sharp-->
```
### Platform specificity
When using icons in Ionic Framework you can specify different icons per platform. Use the `md` and `ios` attributes and provide the platform specific icon/variant name.
```html
<ion-icon ios="heart-outline" md="heart-sharp"></ion-icon>
```
## Size
To specify the icon size, you can use the size attribute for our pre-defined font sizes.
```html
<ion-icon size="small"></ion-icon>
<ion-icon size="large"></ion-icon>
```
Or you can set a specific size by applying the `font-size` CSS property on the `ion-icon` component. It's recommended to use pixel sizes that are a multiple of 8 (8, 16, 32, 64, etc.)
```css
ion-icon {
font-size: 64px;
}
```
## Color
Specify the icon color by applying the `color` CSS property on the `ion-icon` component.
```css
ion-icon {
color: blue;
}
```
## Stroke width
When using an `outline` icon variant it is possible to adjust the stroke width, for improved visual balance relative to the icon's size or relative to the width of adjacent text. You can set a specific size by applying the `--ionicon-stroke-width` CSS custom property to the `ion-icon` component. The default value is 32px.
```html
<ion-icon name="heart-outline"></ion-icon>
```
```css
ion-icon {
--ionicon-stroke-width: 16px;
}
```
## Migrating from v4
See the [changelog](https://github.com/ionic-team/ionicons/blob/master/CHANGELOG.md#500-2020-01-15) for a list of icon deletions/renames.
## License
Ionicons is licensed under the [MIT license](http://opensource.org/licenses/MIT).
## Related
* [Ionicons Homepage](http://ionicons.com/)
* [Ionic Framework](https://ionicframework.com/)
* [Ionic Worldwide Slack](http://ionicworldwide.herokuapp.com/)
* [Ionic Forum](https://forum.ionicframework.com/)
* [Stencil](https://stenciljs.com/)
* [Stencil Worldwide Slack](https://stencil-worldwide.slack.com)
weixin_38679178
- 粉丝: 4
- 资源: 919
最新资源
- Java毕业设计-springboot-vue-工作量统计系统(源码+sql脚本+29页零基础部署图文详解+29页论文+环境工具+教程+视频+模板).zip
- Java毕业设计-springboot-vue-高校疫情防控web系统(源码+sql脚本+29页零基础部署图文详解+31页论文+环境工具+教程+视频+模板).zip
- 基于模型的六轴机器人阻抗控制算法演示与仿真参数设置指导(matlab simscape仿真机器人模型自定义切换,跟踪轨迹展示及算法学习),基于模型的六轴机器人阻抗力控制算法(matlab simsca
- Java毕业设计-springboot-vue-工资信息管理系统(源码+sql脚本+29页零基础部署图文详解+25页论文+环境工具+教程+视频+模板).zip
- 基于PaddlePaddle的眼疾识别项目(包含训练集、测试集、模型权重)
- Java毕业设计-springboot-vue-航班进出港管理系统(源码+sql脚本+29页零基础部署图文详解+29页论文+环境工具+教程+视频+模板).zip
- 基于ABAQUS、Opensees和Perform3d的结构易损性评估与IDA曲线绘制:matlab函数调用与地震波选波调幅实战指南,ABAQUS 、Opensees、Perform3d IDA曲线
- Java毕业设计-springboot-vue-果蔬作物疾病防治系统(源码+sql脚本+29页零基础部署图文详解+30页论文+环境工具+教程+视频+模板).zip
- Java毕业设计-springboot-vue-滑雪场管理系统(源码+sql脚本+29页零基础部署图文详解+27页论文+环境工具+教程+视频+模板).zip
- Java毕业设计-springboot-vue-家教管理系统(源码+sql脚本+29页零基础部署图文详解+32页论文+环境工具+教程+视频+模板).zip
- Java毕业设计-springboot-vue-驾校预约学习系统(源码+sql脚本+29页零基础部署图文详解+34页论文+环境工具+教程+视频+模板).zip
- 数据采集系统:下位机与上位机协同工作,高性能模数转换与灵活配置滤波功能,数据采集系统下位机与上位机代码 下位机采用开发板来完成 AD9226模数转芯片,最大65MHz采样,12bit量化 双通
- Java毕业设计-springboot-vue-集团门户网站(源码+sql脚本+29页零基础部署图文详解+33页论文+环境工具+教程+视频+模板).zip
- 蓝桥杯Java历年真题及其解析.docx
- Java毕业设计-springboot-vue-教师薪酬管理系统(源码+sql脚本+29页零基础部署图文详解+32页论文+环境工具+教程+视频+模板).zip
- Java毕业设计-springboot-vue-教学辅助系统(源码+sql脚本+29页零基础部署图文详解+31页论文+环境工具+教程+视频+模板).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈