当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS 文字

CSS
CSS 介绍
CSS 语法
使用 CSS
CSS 背景
CSS 文字
CSS 字体
CSS 边框
CSS 边距
CSS 填充
CSS 列表
CSS 尺寸
CSS 类别
CSS 定位
CSS 伪类
CSS 伪元素
CSS2 Media类型
CSS 摘要
CSS 实例
CSS2 参考资料
CSS2 打印

CSS 文字


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 943 ::
收藏到网摘: n/a

The CSS text properties define the appearance of text.
CSS文字属性可用来定义文字的外观


实例

Set the color of the text
This example demonstrates how to set the color of the text.
设置文字的颜色

Set the background-color of the text
This example demonstrates how to set the background-color of a part of the text.
设置文字背景色

Specify the space between characters
This example demonstrates how to increase or decrease the space between characters.
指定相邻字符的间隙

Align the text
This example demonstrates how to align the text.
对齐文字

Decorate the text
This example demonstrates how to add decoration to text.
文字修饰

Indent text
This example demonstrates how to indent the first line of a paragraph.
文字在段落中缩进

Control the letters in a text
This example demonstrates how to control the letters in a text.
控制文字中的字母


CSS Text Properties
CSS 文字属性

The CSS text properties allow you to control the appearance of text. It is possible to change the color of a text, increase or decrease the space between characters in a text, align a text, decorate a text, indent the first line in a text, and more.
CSS文字属性允许你控制文字的外观。这可以改变文字的颜色,增加或者缩短文字的间距,文字的对齐,装饰,第一行文字的缩进,还有其他...

Browser support: IE: Internet Explorer, F: Firefox, N: Netscape.
浏览器支持: IE: Internet Explorer, F: Firefox, N: Netscape.

W3C: The number in the "W3C" column indicates in which CSS recommendation the property is defined (CSS1 or CSS2).
在W3C中的数字代表CSS的版本(CSS1或CSS2)

Property属性 Description描述 Values IE F N W3C
color Sets the color of a text
设置文字颜色
color 3 1 4 1
direction Sets the text direction
设置文字的书写方向
ltr
rtl
6 1 6 2
letter-spacing Increase or decrease the space between characters
字符间距
normal
length
4 1 6 1
text-align Aligns the text in an element
在一元素中怎么对齐文字(向左,向右..)
left
right
center
justify
4 1 4 1
text-decoration Adds decoration to text
添加文字修饰(下划线等等)
none
underline
overline
line-through
blink
4 1 4 1
text-indent Indents the first line of text in an element
首行文字缩进
length
%
4 1 4 1
text-shadow   none
color
length
       
text-transform Controls the letters in an element
控制字母(大写,小写。。)
none
capitalize
uppercase
lowercase
4 1 4 1
unicode-bidi   normal
embed
bidi-override
5     2
white-space Sets how white space inside an element is handled
设置怎样给一元素控件留白
normal
pre
nowrap
5 1 4 1
word-spacing Increase or decrease the space between words
单词间距
normal
length
6 1 6 1

评论 (0) All

登陆 | 还没注册?