当前位置:网站首页>图标字体
图标字体
2022-07-27 12:48:00 【不好意思,此人不存在】
图标字体
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="/font/css/all.css">
<style> li{
list-style: none; } li::before{
/* 通过伪元素来设置图标字体 1.找到要设置图标的元素通过before或after选中 2.在content中设置字体的编码 3.设置字体的样式 fab font-family:'Font Awesome 5 Brands'; fas font-family:'Font Awesome 5 Free'; font-weight:900; */ content: '\f1b0'; font-family: 'Font Awesome 5 Free'; font-weight: 900; color: blue; margin-right: 10px; } </style>
</head>
<body>
<!-- 图标字体(iconfont) -在网页中经常需要使用一些图标,可以通过图片来引入图标 但是图片大小本身比较大,并且非常的不灵活 -所以在使用图标时,我们还可以将图标直接设置为字体, 然后呢后通过font-face的形式来对字体进行引入 -这样我们就可以通过字体的形式来使用图标 font awesome使用步骤 1.下载 英文官网下载 2.解压 3.将css和webfonts移动到项目中 4.将all.css引入到网页中 5.使用图标字体 -直接通过类名来使用图标字体 class="fas fa-bell" class="fab fa-accessible-icon" -->
<!-- <i class="fas fa-bell"></i> -->
<ul>
<li>
锄禾日当午
</li>
<li>...</li>
</ul>
<!-- 通过实体来使用图标字体: &#x图标的编码; -->
<span class="fas"></span>
</body>
</html>
边栏推荐
- Top 10 international NFT exchanges
- A survey of video game addictive behavior research
- BSP视频教程第21期:轻松一键实现串口DMA不定长收发,支持裸机和RTOS,含MDK和IAR两种玩法,比STM32CubeMX还方便(2022-07-24)
- Time tool class, get the current time, date to string
- SSM实战项目-前后分离(简单易懂)
- ECCV2022 | RU&谷歌提出用CLIP进行zero-shot目标检测!
- 视频游戏沉迷行为研究综述
- Delay queue performance test
- 4. Analysis of the execution process of make modules for general purposes
- Firefox 103 发布,更快、更安全
猜你喜欢
随机推荐
SparkSubmit.main()方法提交外部参数,远程提交standalone集群任务
延迟队列DelayQueue性能测试
记忆中的香河肉饼
ECCV2022 | RU&谷歌提出用CLIP进行zero-shot目标检测!
@Simple understanding and use of conditionalonproperty
JS date and time format (year, month, day, hour, minute, second, week, quarter, time difference acquisition, date and timestamp conversion function)
js真伪数组转换
How can the top 500 enterprises improve their R & D efficiency? Let's see what industry experts say!
Gan: generate adversarial networks
[cute new solution] Fibonacci sequence
PySide6/PyQt开发经验总结(2) - 设置快捷键
[node+ts] build node+typescript project
Self built personalized automatic quotation system to cope with changeable quotation mode
Multi activity disaster recovery construction after 713 failure of station B | takintalks share
详述try-catch-finally
flinksql从Oracle同步数据到Doris,一共50几个字段,Oracle表中3000多万条
银行案例|Zabbix跨版本升级指南,4.2-6.0不香吗?
[nuxt 3] (XII) project directory structure 2
【VSCode】SyntaxError: Cannot use import statement outside a module
聊聊feign组件的一个重要类RefectiveFeign









