文字与文本

14.1css中长度和颜色
in 英寸
cm 公分
mm 公里
cm 以目前高度为单位
ex 以小写字母高度为单位
pt 1pt/72英寸
pc 1pc/12pt
px 像素(推荐使用)
十六进制 如:color:#ff0000
颜色名称 如:color:red
三原色单位 如:rgb(255,0,0)

一般用十六进制,三原色单位[红(r)绿(g)蓝(b)]混合的每个数值在0~255

14.2css中的文字属性
font-style normal 正常显示
italic 斜体
font-size 像素 字体大小
百分比 字体大小
font-family 字体名称 设置字体名称
font:是否斜体 是否同宽 是否粗体 大小
font:italic bold 200 隶书;(顺序不能变)

 

14.3css中的文本属性
color 十六进制 颜色
英文名称 颜色
三原色单位 颜色

letter-spacing noranl 正常显示
长度 文本间隔

word-spacing noranl 正常显示
数字 单词间隔

white-space normal 文本自动处理换行
pre 换行和空白受保护
nowrap 强制在同一行显示
(word-wrap:break-word;)自动换行

text-align left 文字靠左
right 文字靠右
center 文字靠中

text-decoration none 正常显示
underline 加上下划线
overline 加顶线
line-through 加删除线

text-indent 长度 首行缩进
百分比 首行缩进

line-height 像素 行高
数字/百分比 行高

text-transform none 正常显示包含大小字符
capitalize 字符串第一个字符大写
uppercase 设置大写字符
lowercase 设置小写字符

vertical-align sub 设置文字为下标
super 设置文字为上标
top 元件往上端靠齐
middle 设置文字在中线位置
bottom 元件往下端靠齐

 

posted on 2016-10-31 19:04  加号与剑豪  阅读(360)  评论(0编辑  收藏  举报

导航