网站首页 > 技术文章 正文
分享兴趣,传播快乐,增长见闻,留下美好!
亲爱的您,这里是LearningYard学苑。
Share interest, spread happiness, increase knowledge, and leave behind beauty!
Dear you, this is LearningYard Academy.
今天小编为大家带来话说前端(十一)----css的文字属性,欢迎您的访问。
今天来讲一讲文字的属性
Today, Xiaobian brings you the front end (11)-the character attribute of CSS. Welcome to visit.
Let's talk about the attributes of words today.
首先关于颜色:有背景颜色和字体颜色,背景颜色属性为background-color:,我们可以直接给他blue,也可以写成rgb的形式,也可以写成三原色的形式,如:rgb(16,16,16),#cffff。再者就是字体颜色,属性为color,添加的颜色跟背景颜色的格式一样。
First of all, about color: there are background color and font color, and the background color attribute is background-color:. We can give it to him directly, or it can blue written in the form of rgb or three primary colors, such as: rgb(16, 16, 16), #cffff. Furthermore, it is the font color, the attribute is color, and the added color has the same format as the background color.
第二就是字体的样式,在word里头可以有楷体,草书,黑体,同样的在网页上也可以这样显示。用的就是font-family:,但是要记住,这个字体你一定是要下载过的,如果没有下载,那么就会默认显示和黑体。再者就是font-style:,这个样式可以把他设置为斜体。
The second is the font style. In word, there can be regular script, cursive script and bold font, and the same can be displayed on the webpage. Use font-family:, but remember, you must have downloaded this font. If you haven't downloaded it, it will be displayed in bold by default. Furthermore, it is font-style:, which can set it in italics.
第三字体的粗细,用font-weight,正常是400,注意没有单位,400以上就会变大,400一下就会变小,font-size为字体大小,正常写成14px,,上曾下减。
The thickness of the third font, using font-weight, is normally 400. Note that if there is no unit, it will get bigger if it is above 400, and it will get smaller once it is 400. font-size is the font size, which is normally written as 14px, and it has been decreased from top to bottom.
第四就是line-hight,行高,如果行高等于容器的高度,在上下居中,同样的和text-align:center连用可以保证中心居中。
The fourth is line-high, line height. If the line height is higher than the height of the container, it is centered on the top and bottom. The same can be used with text-align: center to ensure the center is centered.
第五text-decoration,可以有下划线:underline,贯穿线line-througn,还有在顶部的线(不常用)
The fifth text-decoration can be underlined: underline, through line-throughput, and the line at the top (not commonly used).
今天的分享就到这里,如果你有什么独特的想法,欢迎给我们留言,让我们相约明天,祝你今天过得开心快乐。
翻译:Google翻译
本文由LearningYard新学苑原创,部分图片文字来自网络,如有侵权请联系。
That's all for today's sharing. If you have any unique ideas, please leave us a message and let's make an appointment tomorrow. I wish you a happy day.
Translation: Google translation
This article is original by LearningYard New Academy, and some pictures and texts are from the Internet. If there is any infringement, please contact.
文案:李仕阳
排版:李仕阳
审核:闫庆红
猜你喜欢
- 2024-10-11 Windows XP、ClearType 和微软雅黑字体的那点事
- 2024-10-11 前后端数据交互(四)——fetch 请求详解
- 2024-10-11 小白总结:前端HTML基础知识点(1)——元素总结
- 2024-10-11 领导给了你大块文字,晦涩难懂,还要有设计感,快来解救我吧!
- 2024-10-11 高薪前端必备,后端工程师带你学canvas,第一节:图片上绘制字体
- 2024-10-11 零基础教你学前端——66、CSS谷歌字体和Icon图标
- 2024-10-11 「前端添加水印」你真的了解全面吗?
- 2024-10-11 前端OCR图片文字提取功能 #ocr识别
- 2024-10-11 一起学 pixijs(4):如何绘制文字 pic字设怎么上色
- 2024-10-11 HTML网页制作常用标签及说明——前端开发入门
你 发表评论:
欢迎- 501℃几个Oracle空值处理函数 oracle处理null值的函数
- 498℃Oracle分析函数之Lag和Lead()使用
- 495℃Oracle数据库的单、多行函数 oracle执行多个sql语句
- 482℃0497-如何将Kerberos的CDH6.1从Oracle JDK 1.8迁移至OpenJDK 1.8
- 478℃Oracle 12c PDB迁移(一) oracle迁移到oceanbase
- 472℃【数据统计分析】详解Oracle分组函数之CUBE
- 454℃Oracle有哪些常见的函数? oracle中常用的函数
- 452℃最佳实践 | 提效 47 倍,制造业生产 Oracle 迁移替换
- 最近发表
-
- Directus 火了!无代码 SQL 数据的协作应用利器!
- PHP和NodeJS的代码执行效率比较(php和nodejs的区别)
- 工商银行获得发明专利授权:“基于数据库映射动态接口的前端页面应用开发方法及装置”
- FAISS和Chroma:两种流行的向量数据库的比较
- 什么是数据库的索引?(数据库索引的定义和作用)
- Vercel和Neon“首次”推出用于前端云的无服务器SQL数据库
- 记一次前端逻辑绕过登录到内网挖掘
- 学Access好还是MySQL好?(access与mysql的语句区别)
- 惬意!清晨慢品 HTML canvas 标签题,面试知识轻松 get
- 前端实现知识图谱-force(d3.js)(前端知识树)
- 标签列表
-
- 前端设计模式 (75)
- 前端性能优化 (51)
- 前端模板 (66)
- 前端跨域 (52)
- 前端缓存 (63)
- 前端react (48)
- 前端aes加密 (58)
- 前端脚手架 (56)
- 前端md5加密 (54)
- 前端富文本编辑器 (47)
- 前端路由 (55)
- 前端数组 (65)
- 前端定时器 (47)
- Oracle RAC (73)
- oracle恢复 (76)
- oracle 删除表 (48)
- oracle 用户名 (74)
- oracle 工具 (55)
- oracle 内存 (50)
- oracle 导出表 (57)
- oracle 中文 (51)
- oracle链接 (47)
- oracle的函数 (57)
- 前端调试 (52)
- 前端登录页面 (48)
本文暂时没有评论,来添加一个吧(●'◡'●)