html 中的常规字形图标使用
Regular glyphicons usage in html
我正在尝试使用来自 glyphicons(dot)com 的字形图标,但我找不到如何在我的代码中使用它们...我是否应该制作某种 css 文件(比如它是在 bootstrap) 中完成,或者我应该 link 它以某种方式进入我的 html?
我希望有人知道答案:) 谢谢!
<li><a href="#"><span class="glyphicons-44-group"></span> Clans </a></li>
如果有帮助,这是我想使用 glyphicon(带有 glyphicon 代码)的代码之一。
顺便说一句,路径是 "glyph/glyph/glyph/png"
首先你想引用你在页面上使用的同一个字形库,而不是使用 span 标签来放置你的字形
将此 cdn link 包含在您的 head 标签中
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
然后使用你的 span 标签来使用 glyphicon
<span class="glyphicon glyphicon name"></span>
你下载的图标是PNG格式的,我觉得你应该试试这个:
<li><a href="#"><img src="YOUR_PATH"> Clans </a></li>
如果您使用的是 Boostrap,那么 Glyphicons 已经包含在内,因此无需 link 它们(前提是您已经 Bootstrap linked)。但是,如果您不使用 Bootstrap,您可以像 Troyer 评论的那样调用 Glyphicons:
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
然后您可以在页面上显示 Glyphicons,如下所示:
<span class="glyphicon glyphicon-search"></span>
请注意特定图标 class 之前的额外字形 class。
如果您需要更多帮助,请查看 this page.
对于GLYPHICONS use. You need to buy License或免费使用。想自由就变小
GLYPHICONS Basic set
.png
个图标。
使用示例
<img src="path/glyphicons-11-envelope.png" alt="glyphicons envelope icon" height="16" width="24" />
所有许可证
GLYPHICONS Basic set
GLYPHICONS Halflings
GLYPHICONS Filetypes
GLYPHICONS Social
All sets in raster files*
Commercial use**
使用示例
<img src="path/glyphicons-11-envelope.png" alt="glyphicons envelope icon" height="16" width="24" />
PRO 许可证
GLYPHICONS Basic set
GLYPHICONS Halflings
GLYPHICONS Filetypes
GLYPHICONS Social
All sets in raster files*
All sets in vector files
All sets as a web font
All sets in live HTML/CSS
Future updates for free
Commercial use**
使用示例
<img src="path/glyphicons-11-envelope.png" alt="glyphicons envelope icon" height="16" width="24" />
/* Note: You can use @2x and @3x size. */
<i class="glyphicon glyphicon-envelope" aria-hidden="true"></i> /* This is for example */
只能免费使用 GLYPHICONS icon using HTML/CSS
from Twitter-Bootstrap 文件。
使用示例
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<i class="glyphicon glyphicon-envelope" aria-hidden="true"></i>
这就是关于 GLYPHICON 的全部知识。
我正在尝试使用来自 glyphicons(dot)com 的字形图标,但我找不到如何在我的代码中使用它们...我是否应该制作某种 css 文件(比如它是在 bootstrap) 中完成,或者我应该 link 它以某种方式进入我的 html? 我希望有人知道答案:) 谢谢!
<li><a href="#"><span class="glyphicons-44-group"></span> Clans </a></li>
如果有帮助,这是我想使用 glyphicon(带有 glyphicon 代码)的代码之一。 顺便说一句,路径是 "glyph/glyph/glyph/png"
首先你想引用你在页面上使用的同一个字形库,而不是使用 span 标签来放置你的字形
将此 cdn link 包含在您的 head 标签中
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
然后使用你的 span 标签来使用 glyphicon
<span class="glyphicon glyphicon name"></span>
你下载的图标是PNG格式的,我觉得你应该试试这个:
<li><a href="#"><img src="YOUR_PATH"> Clans </a></li>
如果您使用的是 Boostrap,那么 Glyphicons 已经包含在内,因此无需 link 它们(前提是您已经 Bootstrap linked)。但是,如果您不使用 Bootstrap,您可以像 Troyer 评论的那样调用 Glyphicons:
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
然后您可以在页面上显示 Glyphicons,如下所示:
<span class="glyphicon glyphicon-search"></span>
请注意特定图标 class 之前的额外字形 class。
如果您需要更多帮助,请查看 this page.
对于GLYPHICONS use. You need to buy License或免费使用。想自由就变小
GLYPHICONS Basic set
.png
个图标。
使用示例
<img src="path/glyphicons-11-envelope.png" alt="glyphicons envelope icon" height="16" width="24" />
所有许可证
GLYPHICONS Basic set
GLYPHICONS Halflings
GLYPHICONS Filetypes
GLYPHICONS Social
All sets in raster files*
Commercial use**
使用示例
<img src="path/glyphicons-11-envelope.png" alt="glyphicons envelope icon" height="16" width="24" />
PRO 许可证
GLYPHICONS Basic set
GLYPHICONS Halflings
GLYPHICONS Filetypes
GLYPHICONS Social
All sets in raster files*
All sets in vector files
All sets as a web font
All sets in live HTML/CSS
Future updates for free
Commercial use**
使用示例
<img src="path/glyphicons-11-envelope.png" alt="glyphicons envelope icon" height="16" width="24" />
/* Note: You can use @2x and @3x size. */
<i class="glyphicon glyphicon-envelope" aria-hidden="true"></i> /* This is for example */
只能免费使用 GLYPHICONS icon using HTML/CSS
from Twitter-Bootstrap 文件。
使用示例
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<i class="glyphicon glyphicon-envelope" aria-hidden="true"></i>
这就是关于 GLYPHICON 的全部知识。