图1
图2
图3
属性名称
功能描述
设置值
例
color
文字的颜色
颜色的英文名或十六进制的rgb色
color:red color:#f00f01
font-family
文字字型
字型名称
font-family:宋体
font-size
文字大小
pt、in、cm、px、xx-small、x-small、small、medium、large、x-large、xx-large
font-size:x-large font-size:1cm
font-weight
文字粗细
extra-light、light、demi-light、medium、demi-bold、bold、extra-bold
font-weight:light
font-style
字型样式
normal、italic
font-style:italic
text-align
文字位置
center、right、left
text-align:left
text-indent
文字缩排
pt(点)in(英寸)cm(厘米)px(像素)
text-indent:20pt
text-transform
大小写转换
capitalize、uppercase、lowercase
text-transform:uppercase
text-decoration
文字加线设置
underline、ouerline、line-through
text-decora:underline
设置值与单位
display
组件的显示状态
none、block、inline
width
组件的宽度
pt、in、cm、px
background-color
组件的背景颜色
颜色英文名或十六进制rgb
padding
组件与四边的距离
padding-left
组件与左边的距离
padding-right
组件与右边的距离
padding-top
组件与上边的距离
padding-bottom
组件与下边的距离
border
方形边框
border-left
方形的左边框
border-right
border-top
方形的上边框
border-bottom
方形的下边框
border-color
方形边框的颜色
颜色的英文名或十六进制rgb
border-wide
方形边框的宽度
thin 、medium、thick、pt、in、cm、px
border-style
方形边框的样式
none、dotted、solid、double