16pxls 中文文档教程
出于对图标集的需求而诞生,该图标集可以在垂直和水平列表中很好地对齐。 非常适合导航、按钮、标题或列表。 如果您对排列的东西很着迷,那么这个图标集非常适合您!
Documentation
可以从 dist/docs 访问每个图标的参考/index.html。 如果您之前没有使用过 SVG,那么我建议您查看进一步阅读部分,获取文章列表以加快速度。
Installation
npm install 16pxls
或 yarn add 16pxls
如果您没有使用包管理器,那么请随意从 Github 下载 zip。
Css
在您的 标签中包含
16pxls.css
,或在您的 Css 中包含 @import url('');
。
或
@import url('16pxls.css') ;
添加类 .icon-*
将 *
替换为您要使用的图标的名称。
这会将图标添加为 SVG 背景图像。 您可能希望创建一个单独的类来设置容器的样式。 例如 .icon {display:inline-block;width:16px;height:16px;}
Font
Font has been built using IcoMoon App,在 dist/fonts/
文件夹中,您会找到详细说明如何使用它的 demo.html
和 readme.txt
。
Gulp
在开发过程中,我使用了各种 Gulp 插件。 如果你想利用这些,你可以。
npm install
或 yarn install
取决于您首选的包管理器。
Tasks
gulp cleanSVG
- Cleans SVG exported from Sketchgulp cleanIcons
- Used to remove all icons from folders (not .SVGs), useful if you only want to use a few SVGs.gulp iconList
- Creates a .JSON file of all icons in/dist/svg/
folder, useful for fallbacks. Outputs todist/docs/assets/json
.gulp processIcons
- Runs multiple tasks, in order, cleaning SVGs, converting them to image files (including Retina), and optimising. You could run this if you decided to only use a certain number of icons rather than uploading all of them.
Recommended Plugins
- gulp-embed-svg. Great for embedding SVG data whilst keeping code clean during development.
Further Reading
Included File Types
- .SVG
- .PNG (inc. Retina)
- .JPG (inc. Retina)
- .CSS
- .WOFF
- .TTF
- .EOT
- .FIG (for Figma)
License
Born out of a need for an icon set that would align well in vertical and horizontal lists. Great for navigation, buttons, headings or lists. If you are obsessed with things lining up, then this icon set is perfect for you!
Documentation
Reference for each icon can be accessed from dist/docs/index.html
. If you've not use SVG before then I suggest you check out the Further Reading section, for a list of articles to get up to speed.
Installation
npm install 16pxls
or yarn add 16pxls
If you are not using a package manager then feel free to just download the zip off Github.
Css
Include 16pxls.css
in your <head>
tags, or @import url('');
in your Css.
<link rel="stylesheet" href="/dist/css/16pxls.css">
or @import url('16pxls.css');
Add the class .icon-*
replacing the *
with the name of the icon you want to use.
<span class="icon-Skull"></span>
This will add the icon as an SVG background image. You may want to create a separate class to style the container. e.g. .icon {display:inline-block;width:16px;height:16px;}
Font
Font has been built using IcoMoon App, within the dist/fonts/
folder you'll find the demo.html
and readme.txt
detailing how to use it.
Gulp
During development I've used various Gulp plugins. If you want to take advantage of these you can.
npm install
or yarn install
depending on your preferred package manager.
Tasks
gulp cleanSVG
- Cleans SVG exported from Sketchgulp cleanIcons
- Used to remove all icons from folders (not .SVGs), useful if you only want to use a few SVGs.gulp iconList
- Creates a .JSON file of all icons in/dist/svg/
folder, useful for fallbacks. Outputs todist/docs/assets/json
.gulp processIcons
- Runs multiple tasks, in order, cleaning SVGs, converting them to image files (including Retina), and optimising. You could run this if you decided to only use a certain number of icons rather than uploading all of them.
Recommended Plugins
- gulp-embed-svg. Great for embedding SVG data whilst keeping code clean during development.
Further Reading
Included File Types
- .SVG
- .PNG (inc. Retina)
- .JPG (inc. Retina)
- .CSS
- .WOFF
- .TTF
- .EOT
- .FIG (for Figma)