简体   繁体   English

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

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

I would like to be able to create icons/colored CSS text blocks such as these: 我希望能够创建如下图标/彩色CSS文本块:

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

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

I have no idea where to start looking for these as I have no idea wather this is HTML, PHP, or just CSS or a combination of them. 我不知道从哪里开始寻找它们,因为我不知道这是HTML,PHP还是CSS或它们的组合。

Thanks in advance. 提前致谢。

EDIT: I have looked at the source code, but all I see is that they are class files to something, can't trace it down. 编辑:我已经看过源代码,但是我所看到的只是它们是类文件,无法跟踪。

A combination of twitter bootstrap with font awesome should be good to start with. 首先结合使用twitter引导程序和超棒的字体。 Here are the links - http://twitter.github.io/bootstrap/ 这是链接-http://twitter.github.io/bootstrap/
http://fortawesome.github.io/Font-Awesome/ http://fortawesome.github.io/Font-Awesome/

Most of these look like Bootstrap Badges or Labels with some kind of icon font. 其中大多数看起来像带有某种图标字体的Bootstrap徽章或标签 Lots of Icon Fonts 很多图标字体

They are also quite simple to use... 它们也很容易使用...

DEMO 演示

<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>

Results in: 结果是:

引导程序+ Glyphicons

It also wouldn't be that difficult to craft your own with a little bit of CSS and some icon-fonts. 用一点CSS和一些图标字体来制作自己的东西也不是那么困难。 HTML: HTML:

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

CSS: 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;
}

Which results in something like this: 结果是这样的:

啤酒我

DEMO 演示

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

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