预览加载中,请您耐心等待几秒...
1/5
2/5
3/5
4/5
5/5

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

CSS常用文本属性 文本对齐属性(text-align) 这个属性用来设定文本的对齐方式。有以下值: left(居左,缺省值) right(居右) center(居中) justify(两端对齐) 示例代码如下: .p2{text-align:right} HYPERLINK"http://www.admin5.com/html/css_examples/033_text_align.html"演示示例 <html> <head> <title>文本对齐属性text-align</title> <styletype="text/css"> .p1{text-align:left} .p2{text-align:right} .p3{text-align:center} </style> </head> <body> <pclass="p1">这段的本文对齐属性(text-align)值为居左。</p> <pclass="p2">这段的本文对齐属性(text-align)值为居右。</p> <pclass="p3">这段的本文对齐属性(text-align)值为居中。</p> </body> </html> 文本修饰属性(text-decoration) 这个属性主要设定文本划线的属性。有以下值: none(无,缺省值) underline(下划线) overline(上划线) line-through(当中划线) 示例代码如下: .p2{text-decoration:underline} HYPERLINK"http://www.admin5.com/html/css_examples/031_text_decoration.html"演示示例 <html> <head> <title>文本修饰属性text-decoration</title> <styletype="text/css"> .p1{text-decoration:none} .p2{text-decoration:underline} .p3{text-decoration:line-through} .p4{text-decoration:overline} </style> </head> <body> <pclass="p1">文本修饰属性(text-decoration)的缺省值是none。</p> <pclass="p2">这段的文本修饰属性(text-decoration)值是underline。</p> <pclass="p3">这段的文本修饰属性(text-decoration)值是line-through。</p> <pclass="p4">这段的文本修饰属性(text-decoration)值是overline。</p> </body> </html> 文本缩进属性(text-indent) 这个属性设定文本首行缩进。其值有以下设定方法: length(长度,可以用绝对单位(cm,mm,in,pt,pc)或者相对单位(em,ex,px)) percentage(百分比,相当于父对象宽度的百分比) 示例代码如下: .p1{text-indent:8mm} HYPERLINK"http://www.admin5.com/html/css_examples/036_text_indent.html"演示示例 <html> <head> <title>文本缩进属性text-indent</title> <styletype="text/css"> .p1{text-indent:8mm} .d1{width:300px} .p2{text-indent:50%} </style> </head> <body> <p>下面两端都设定CSS文本缩进属性(text-indent),第一段用长度方法设值,第二段用百分比方法设值。</p> <pclass="p1">芙蓉姐姐说道:“我那妖媚性感的外形和冰清玉洁的气质让我无论走到哪里都会被众人的目光无情地揪出来。我总是很焦点。我那张耐看的脸,配上那副火爆得让男人流鼻血的身体,就注定了我前半生的悲剧。”</p> <divclass="d1"> <pclass=p2>芙蓉姐姐说道:“我那妖媚性感的外形和冰清玉洁的气质让我无论走到哪里都会被众人的目光无情地揪出来。我总是很焦点。我那张耐看的脸,配上那副火爆得让男人流鼻血的身体,就注定了我前半生的悲剧。”</p> </div> </body> </html> 行高属性(line-height) 这个属性设定每行之间的距离。其值有以下设定方法: normal(缺省值) length(长度,可以用绝对单位(cm,mm,in,