其实有一些常见的图标使用字体图标比使用img来得好

Font Awesome 官网:http://fortawesome.github.io/Font-Awesome/

字体代码:http://fortawesome.github.io/Font-Awesome/icons/ (点击图标可见)

使用方法:

最简单的使用,下载压缩包,把font文件夹复制到项目文件夹下,font-awesome.min.css放到CSS文件该放的地方,然后在html代码中link就可以了。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content=""> <title>font awesome</title> <link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/font-awesome.css"> <link rel="stylesheet" type="text/css" href="css/my.css"> </head> <body role="document">
<div class="content">
<div class="wrapper">
<p>教育经历</p>
<p>Education</p>
</div>
<div class="article">
<h4 class="article-title">2012~2016</h4>
<dl>
<dd class="education-major">软件工程计算机应用方向(本科)</dd>
<dd class="education-honor">2012 - 2013 学年度校一等奖学金</dd>
<dd class="education-honor">2013 - 2014 学年度校二等奖学金</dd>
</dl>
</div> </body>
</html>
.wrapper::before {
font-family: FontAwesome;
font-size: inherit;
text-rendering: auto;
background-color: #333333;
color: white;
border-radius: 50px;
float: left;
width: 49px;
height: 49px;
text-align: center;
line-height: 49px;
font-size: 28px;
content: "\f02d";
} .article {
border-left: solid;
margin-top: -15px;
margin-left: 25px;
padding: 25px 25px 5px 25px ;
} .article::after {
font-family: FontAwesome;
font-size: inherit;
text-rendering: auto;
background-color: #333333;
color: #333333;
border-radius: 50px;
float: left;
padding:;
margin-left: -30px;
margin-bottom: 45px;
width: 9px;
height: 9px;
text-align: center;
font-size: 5px;
content: "";
} .article-title::before {
font-family: FontAwesome;
font-size: inherit;
text-rendering: auto;
background-color: #20B2AA;
color: white;
border-radius: 50px;
float: left;
width: 36px;
height: 36px;
margin-top: -10px;
margin-left: -5px;
text-align: center;
line-height: 36px;
font-size: 20px;
content: "\f061";
} .article-title {
/*overflow-x: hidden;*/
background-color: #333333;
border-radius: 6px;
color: white;
margin-left: -40px;
margin-top: -5px;
padding: 5px 0;
}

最后效果:

字体图标font-awesome的更多相关文章

  1. CSS3:不可思议的border属性&Web字体图标Font Awesome

     CSS3:不可思议的border属性 转载至——译文:不可思议的CSS border属性 原文:Magic of CSS border property Web字体图标Font Awesome 转载 ...

  2. 【27前端】字体图标 Font Face

    设计师做的高保真原型图,难免会用到艺术字体. 采用切片的方式,简单,粗暴,节省时间.除了retina屏其它兼容性也是一流.但是在修改的时候,会花很大的力气.即使只是修改文字大小,也需要重新切图,更别说 ...

  3. 字体图标Font Awesome 的使用

    下载地址:http://fontawesome.dashgame.com/ 将下载下来的压缩包解压,然后解压,将下载的整个文件夹复制到你的项目中,在你需要用字体图标的html中引入“font-awes ...

  4. Awesome图标 | 如何在某些编辑软件中使用Font Awesome字体图标

    文章目录 Font Awesome 字体图标 在某些编辑软件中使用 Font Awesome 字体图标 Font Awesome 为您提供可缩放矢量图标,它可以被定制大小.颜色.阴影以及任何可以用 C ...

  5. icon font字体图标字库汇总

    最近在研究icon font图标字库,找了一些比较好的在线字库.大都是开源的,而且各有特色! 阿里icon font字库 http://www.iconfont.cn/ 这个是阿里妈妈M2UX的一个i ...

  6. Font Awesome字体图标

    1.什么是字体图标字体图标是一个包含许多图标的字体库.可以理解为一种特殊的字体,只不过里面包含的都是图标. 2.Font Awesome图标字体库Font Awesome是目前最受欢迎最全面的图标字体 ...

  7. 字体图标 icon font

    Icon font icon font 指的是用字体文件代替图片文件,来展示图标.特殊字体等元素的方法. 应用场景: iconfont的优缺点 大小能够自由地变化 颜色能够自由地改动 加入阴影效果 * ...

  8. 字体图标 轻量级 Font Awesome

    今天呢,来推荐一款请轻量级 字体图标框架.Font Awesome 用法与bootstrap相似 打开网址.download下载,然后打开取到这两个,下载点这里,这个博客弄的挺好的. 找到exampl ...

  9. 字体图标库 IcoMoon IconFont Font Awesome的使用

    在项目开发的过程中,我们会经常用到一些图标.但是我们在使用这些图标时,往往会遇到失真的情况,而且图片数量很多的话,页面加载就越慢.所以,我们可以使用字体图标的方式来显示图标,字体图标任意放大缩小不会失 ...

  10. 字体图标三种格式区别(Unicode / Font class / Symbol)

    在实际项目中,或多或少会用到字体图标,优点是即减少了体积,又减少了http请求,可谓一举两得 我一般是在阿里巴巴矢量图库下载字体图标:http://www.iconfont.cn/   下面以阿里巴巴 ...

随机推荐

  1. 在VUE中实现打印

    1.安装 npm install vue-print-nb --save 2.在mian.js中引入 import Print from 'vue-print-nb' Vue.use(Print); ...

  2. []==![] 为什么等于true?

    最近碰到这样一个问题: []==![]  为什么等于true? 首先分析  !的优先级较==高,先运算==两侧的操作数: typeof []; //"object" typeof ...

  3. [转]深入理解定位父级offsetParent及偏移大小

    偏移量(offset dimension)是javascript中的一个重要的概念.涉及到偏移量的主要是offsetLeft.offsetTop.offsetHeight.offsetWidth这四个 ...

  4. Axure 工具的使用

    Axure RP是一款专业的快速原型设计工具,Axure RP是美国Axure Software Solution公司旗舰产品,是一个专业的快速原型设计工具,让负责定义需求和规格.设计功能和界面的专家 ...

  5. 读书笔记--Head First C#目录

    1.c#助你快速开发2.都只是代码3.对象4.类型与引用5.封装6.继承7.接口与抽象类8.枚举与集合9.读/写文件10.异常处理11.事件与委托12.复习与预习13.控件与图片14.captain ...

  6. R语言可视化--颜色

    RColorBrewer包 三类调色板:sequential / diverging / qualitative 调色板的信息可以与colorRamp / colorRampPalette结合使用 从 ...

  7. 模拟19 题解(waiting)

    T1,千万别转化成链了!! 直接数就可以,dfs搜索每种情况,对于搜到的点,如果子树大小过大,直接return,相等说明可以,小的话向上累加, 优化是先预处理子树大小,若子树小,不用搜了直接加上就行 ...

  8. 响应式布局及bootstrap(实例)

    说明: 这几天公司要求网站实现响应式布局,所以对响应式布局进行了相对全面的了解,并做了几个实例. 转载请注明源地址,谢谢^_^,http://www.cnblogs.com/liu-zhen/p/44 ...

  9. js获取时间差值

    function GetTime(firstDate, secondDate) { // 1.对事件进行处理 var firsttime = Date.parse(firstDate + " ...

  10. 【JZOJ3640】【COCI2014】utrka

    Mission 2<=N<=300,2<=M<=N∗(N−1) Solution SPFA. 由于只是二元关系,所以条件随便写. 具体来说,如果是u⇒v. 若v的最大领先时间还 ...