字体图标font-awesome
其实有一些常见的图标使用字体图标比使用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的更多相关文章
- CSS3:不可思议的border属性&Web字体图标Font Awesome
CSS3:不可思议的border属性 转载至——译文:不可思议的CSS border属性 原文:Magic of CSS border property Web字体图标Font Awesome 转载 ...
- 【27前端】字体图标 Font Face
设计师做的高保真原型图,难免会用到艺术字体. 采用切片的方式,简单,粗暴,节省时间.除了retina屏其它兼容性也是一流.但是在修改的时候,会花很大的力气.即使只是修改文字大小,也需要重新切图,更别说 ...
- 字体图标Font Awesome 的使用
下载地址:http://fontawesome.dashgame.com/ 将下载下来的压缩包解压,然后解压,将下载的整个文件夹复制到你的项目中,在你需要用字体图标的html中引入“font-awes ...
- Awesome图标 | 如何在某些编辑软件中使用Font Awesome字体图标
文章目录 Font Awesome 字体图标 在某些编辑软件中使用 Font Awesome 字体图标 Font Awesome 为您提供可缩放矢量图标,它可以被定制大小.颜色.阴影以及任何可以用 C ...
- icon font字体图标字库汇总
最近在研究icon font图标字库,找了一些比较好的在线字库.大都是开源的,而且各有特色! 阿里icon font字库 http://www.iconfont.cn/ 这个是阿里妈妈M2UX的一个i ...
- Font Awesome字体图标
1.什么是字体图标字体图标是一个包含许多图标的字体库.可以理解为一种特殊的字体,只不过里面包含的都是图标. 2.Font Awesome图标字体库Font Awesome是目前最受欢迎最全面的图标字体 ...
- 字体图标 icon font
Icon font icon font 指的是用字体文件代替图片文件,来展示图标.特殊字体等元素的方法. 应用场景: iconfont的优缺点 大小能够自由地变化 颜色能够自由地改动 加入阴影效果 * ...
- 字体图标 轻量级 Font Awesome
今天呢,来推荐一款请轻量级 字体图标框架.Font Awesome 用法与bootstrap相似 打开网址.download下载,然后打开取到这两个,下载点这里,这个博客弄的挺好的. 找到exampl ...
- 字体图标库 IcoMoon IconFont Font Awesome的使用
在项目开发的过程中,我们会经常用到一些图标.但是我们在使用这些图标时,往往会遇到失真的情况,而且图片数量很多的话,页面加载就越慢.所以,我们可以使用字体图标的方式来显示图标,字体图标任意放大缩小不会失 ...
- 字体图标三种格式区别(Unicode / Font class / Symbol)
在实际项目中,或多或少会用到字体图标,优点是即减少了体积,又减少了http请求,可谓一举两得 我一般是在阿里巴巴矢量图库下载字体图标:http://www.iconfont.cn/ 下面以阿里巴巴 ...
随机推荐
- TZ_13_微服务场景Eureka
1.搭建Eureka的注册中心 1.1Eureka几个时间间隔配置详解 1 >客户端信息上报到eureka服务的时间周期,配置的值越小,上报越频繁,eureka服务器应用状态管理一致性越高 #客 ...
- localStorage对象简单应用 - - 访问次数
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Cors之带凭据的请求
带凭据的请求 默认情况下,跨源请求不提供凭据.通过将withCredentials属性设置为true,可以制定某个请求应该发送凭据.
- 利用HttpWebRequest通过POST Json数据在.net后台实现不同平台间的数据传输
/// <summary> /// 返回JSon数据 /// </summary> /// <param name="JSONData">要处理 ...
- Python基础-列表、元组、字典、字符串
Python基础-列表.元组.字典.字符串 多维数组 nums1 = [1,2,3] #一维数组 nums2 = [1,2,3,[4,56]] #二维数组 nums3 = [1,2,3,4,['a ...
- 【Codeforces Round #430 (Div. 2) D】Vitya and Strange Lesson
[链接]点击打开链接 [题意] 给出一个数组,每次操作将整个数组亦或一个数x,问得到的数组的结果中的mex.mex表示为自然数中第一个没有出现过的数. [题解] 异或的效果是可以累加的,所以不用每次都 ...
- web前端学习(三)css学习笔记部分(3)-- css常用操作
5. CSS常用操作 5.1 对齐 使用margin属性进行水平对齐 <!DOCTYPE html> <html lang="en"> <head ...
- plotroc.m
function out1 = plotroc(varargin) %PLOTROC Plot receiver operating characteristic. % % <a href=&q ...
- Linux C/C++开发
首先就是要熟练在vim里面写代码,其实就是没有提示和自动补全了,这个问题并不大. 我服务器gcc版本是4.8.5,所以就按照这个来了 https://gcc.gnu.org/onlinedocs/gc ...
- systemd管理nginx
首先安装nginx,此处不做赘述. 保存以下内容到/lib/systemd/system/nginx.service文件. [Unit] Description=The NGINX HTTP and ...