css3中text属性有:1、颜色属性color;2、文本对齐属性【text-align】;3、字符间距属性【letter-spacing】;4、文本行高属性【line-height】;5、文本修饰属性【text-decoration】。

本教程操作环境:windows10系统、css3版,该方法适用于所有品牌电脑。
(学习视频分享:css视频教程)
css3中text属性有:
1、color
立即学习“前端免费学习笔记(深入)”;
作用:指定文本的颜色
说明:该属性在块、行内、行内块的样式表中都可以使用,改变被控制元素内部所有文本的颜色
示例:
CSS3之text属性
我是一名前端爱好者1
我是一名前端爱好者2
我是一名前端爱好者3
我是一名前端爱好者4
2、text-align
作用:指定元素文本的水平对齐方式
说明:只在块级元素中使用生效,直接用在内联元素上不生效。如果使用该属性,在块元素中包含的文本、内联元素将会对齐,其内的块元素默认不设置此属性的话也会对齐,是因为子块元素继承父块元素的text-align的属性
示例:
CSS3之font属性
大家好
大家好
大家好
In a sense we've come to our nation's capital to cash a check. When the architects of our republic wrote the magnificent words of the Constitution and the Declaration of Independence, they were signing a promissory note to which every American was to fall heir. This note was a promise that all men, yes, black men as well as white men, would be guaranteed the "unalienable Rights" of "Life, Liberty and the pursuit of Happiness." It is obvious today that America has defaulted on this promissory note, insofar as her citizens of color are concerned. Instead of honoring this sacred obligation, America has given the Negro people a bad check, a check which has come back marked "insufficient funds."
3、letter-spacing:
本文档主要讲述的是关于Objective-C手动内存管理的规则;在ios开发中Objective-C 增加了一些新的东西,包括属性和垃圾回收。那么,我们在学习Objective-C之前,最好应该先了解,从前是什么样的,为什么Objective-C 要增加这些支持。有需要的朋友可以下载看看
作用:增加或减少字符间的空白 (字符间距)
说明:负值过大时,字体会产生挤压,但不会重叠
示例:
CSS3之text属性
Hello World
Hello World
Hello World
4、line-height:
作用:设置文本的行高
说明:不允许使用负值
示例:
CSS3之text属性
Hello World
Hello World
5、text-decoration
作用:规定添加到文本的修饰,下划线、上划线、删除线等
说明:该属性有以下三种简写 text-decoration-line,text-decoration-color,text-decoration-style
示例:
CSS3之text属性
这是超链接
Hello World
Hello World
Hello World
Hello World
相关推荐:CSS教程









