当前位置:网站首页>字体样式及其分类
字体样式及其分类
2022-08-05 05:25:00 【Y-琼眸】
字体样式
1.color 设置颜色
2.font-size 设置字体大小
3.font-family 可以指定文字的字体
[email protected] 自定义字体
前面两个也是咱的老朋友了,那就不多介绍了。后面两个大家会比较陌生,在此讲一下这两个的用法。
@font-face {
/*给字体起个名字*/
font-family: 'xiyy';
/*引入字体的路径*/
src: url(); /* ./ ../ 引用路径*/
这就是自定义字体,可以自己设置一个。
span {
font-family: 'xiyy';
}
这就是将刚刚设置的字体应用在想用的地方,当然这也不是只能用自定义字体,也可以用一些常见的字体。
字体的分类
字体的分类五大类
1.衬线字体 serif['serif]
2.非衬线字体 sans-serif
3.等宽字体 monospace
4.草书字体 cursive
5.虚幻字体 fantasy
/*字体*/
font-family: 'Times New Roman', Times, serif;
/*斜体*/
font-style: italic; /*可选值,normal默认值 italic斜体 oblique斜体*/
/*加粗*/
font-weight: bolder; /*可选值 normal默认值 bolder/bold加粗 100-900之间的数值*/
/*设置小型大写字母*/
font-variant: normal; /*可选值 normal默认值 small-caps设置小型大写字母*/
咱们都是程序员,那偷懒是必须的啊,所以这些玩意有个简写,例如
font: bold italic 60px serif;
但是有一点要注意, 大小和字体必须要写,而且大小在倒数第二个,字体在倒数第一个!
边栏推荐
- Does flink cdc currently support Gauss database sources?
- 无法导入torchvision.io.read_image
- config.js related configuration summary
- 前置++和后置++的区别
- js 使用雪花id生成随机id
- el-progress实现进度条颜色不同
- 系统基础-学习笔记(一些命令记录)
- Autoware--Beike Tianhui rfans lidar uses the camera & lidar joint calibration file to verify the fusion effect of point cloud images
- transport layer protocol
- ES2020新特性
猜你喜欢
Chengyun Technology was invited to attend the 2022 Alibaba Cloud Partner Conference and won the "Gathering Strength and Going Far" Award
txt文件英语单词词频统计
NAT experiment
【FAQ】CCAPI兼容EOS相机列表(2022年8月 更新)
Wireshark packet capture and common filtering methods
Drools规则引擎快速入门(一)
Configuration of routers and static routes
Late night drinking, 50 classic SQL questions, really fragrant~
多用户商城多商户B2B2C拼团砍价秒杀支持小程序H5+APP全开源
GetEnumerator method and MoveNext and Reset methods in Unity
随机推荐
wc, grep, tar, vi/vim
document.querySelector()方法
滚动条问题,未解决
numpy.random使用文档
The hook of the operation of the selenium module
Programmers should understand I/O this way
Pytorch分布式并行处理
selenium学习
The future of cloud gaming
el-progress implements different colors of the progress bar
花花省V5淘宝客APP源码无加密社交电商自营商城系统带抖音接口
Writing OpenCV in VSCode
## 简讲protobuf-从原理到使用
文件内音频的时长统计并生成csv文件
Network Protocol Fundamentals - Study Notes
Mina's long and short connections
H5开发调试-Fiddler手机抓包
reduce()方法的学习和整理
深夜小酌,50道经典SQL题,真香~
Shadowless Cloud Desktop