繁体   English   中英

创建要在php脚本中使用的彩色文本图标(参见图片)

[英]Creating colored text icon to use in php script (see image)

我希望能够创建如下图标/彩色CSS文本块:

http://i.imgur.com/2uzEUuk.png

http://i.imgur.com/rf89BRN.png

我不知道从哪里开始寻找它们,因为我不知道这是HTML,PHP还是CSS或它们的组合。

提前致谢。

编辑:我已经看过源代码,但是我所看到的只是它们是类文件,无法跟踪。

首先结合使用twitter引导程序和超棒的字体。 这是链接-http://twitter.github.io/bootstrap/
http://fortawesome.github.io/Font-Awesome/

其中大多数看起来像带有某种图标字体的Bootstrap徽章或标签 很多图标字体

它们也很容易使用...

演示

<span class="label">Default Label <i class="icon-globe icon-white"></i></span>
<span class="label label-success">Success Label <i class="icon-tag icon-white"></i></span>
<span class="label label-important">Important Label <i class="icon-hand-right icon-white"></i></span>
<span class="label label-warning">Warning Label <i class="icon-hand-left icon-white"></i></span>

结果是:

引导程序+ Glyphicons

用一点CSS和一些图标字体来制作自己的东西也不是那么困难。 HTML:

<span class="label"><span class="fontelico-emo-beer"></span> Beer Me!</span>

CSS:

@import url(http://weloveiconfonts.com/api/?family=fontelico);

/* fontelico */
[class*="fontelico-"]:before {
  font-family: 'fontelico', sans-serif;
}
.label{
    background-color: green;
    font-size: 0.7em;
    padding: 0.4em;
    border-radius: 0.4em;
    color: white;
    font-family: arial, helvetica;
}

结果是这样的:

啤酒我

演示

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM