16pxls 中文文档教程

发布于 7年前 浏览 73 项目主页 更新于 3年前

出于对图标集的需求而诞生,该图标集可以在垂直和水平列表中很好地对齐。 非常适合导航、按钮、标题或列表。 如果您对排列的东西很着迷,那么这个图标集非常适合您!

Alt text

Documentation

可以从 dist/docs 访问每个图标的参考/index.html。 如果您之前没有使用过 SVG,那么我建议您查看进一步阅读部分,获取文章列表以加快速度。

Installation

npm install 16pxlsyarn 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.htmlreadme.txt

Gulp

在开发过程中,我使用了各种 Gulp 插件。 如果你想利用这些,你可以。

npm install yarn install 取决于您首选的包管理器。

Tasks

  • gulp cleanSVG - Cleans SVG exported from Sketch
  • gulp 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 to dist/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

CC-BY-SA-4.0

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!

Alt text

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 Sketch
  • gulp 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 to dist/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

CC-BY-SA-4.0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文