### font-variant
> p { `font-varian`:small-caps;}
### font-style
> p { `font-style`:italio;}
> p { `font-style`:oblique;}
> p { `font-style`:normal;}
### font-weight
> p { `font-weight`:bold;}
> p { `font-weight`:normal;}
### text-transform
> p { `text-transform`:uppercase;}
> p { `text-transform`:lowercase;}
> p { `text-transform`:capitalize;}
> p { `text-transform`:none;}
### text-decoration
> p { `text-decoration`:underline;}
> p { `text-decoration`:overline;}
> p { `text-decoration`:line-through;}
> p { `text-decoration`:blink;}
> p { `text-decoration`:none;}
### word-spacing
> p { `word-spacing`: 1em;}
### letter-spacing
> p { `letter-spacing`: 1em;}
### line-height
> p { `line-height`: 16pt;}
> p { `line-height`: 2;}
> p { `font-size`:10pt;`line-height`:140%;}
Note:行距是字体大小10points的140%,即14.
### text-align
> p { `text-align`:center;}
> p { `text-align`:left;}
> p { `text-align`:right;}
> p { `text-align`:justify;}
### text-indent
> p { `text-indent`:2em;}
### margin
> H4 { `margin-top`: 20px;}
> H4 { `margin-bottom`: 20px;}
> H4 { `margin-right`: 20px;}
> H4 { `margin-left`: 20px;}
### border-width
> H4 { `border-top-width`: 2px }
> H4 { `border-bottom-width`: 2px }
> H4 { `border-left-width`: 2px }
> H4 { `border-right-width`: 2px }
> H4 { `border-width`: 2px }
> H4 { `border-color`: 2px }
### border-style
> H4 { `border-style`: double }
> H4 { `border-style`: solid }
> H4 { `border-style`: dotted }
> H4 { `border-style`: dashed }
> H4 { `border-style`: groove }
> H4 { `border-style`: ridge }
> H4 { `border-style`: inset }
> H4 { `border-style`: outset }
### padding
> H4 { `padding-top`: 20px }
> H4 { `padding-bottom`: 20px }
> H4 { `padding-left`: 20px }
> H4 { `padding-right`: 20px }
### float
> H4 { `float`: left }
### clear
> H4 { `clear`: left }
### background-color
> P.yellow { `background-color`: #FFFF66 }
### background-image
> B { `background-image`: url(background.gif) }
Note:
当你设定一个背景图象时,最好能指定一种背景色。这样以来,下载背景图象的同时,固定的背景色先出现在屏幕上。而且它将透过背景图象上的透明色区显示出来。例如在Pinterest中你可以看到在图像下载完成之前是有某种背景色的。
> P { `background-repeat`: no-repeat }
> P { `background-repeat`: repeat-x }
> P { `background-repeat`: repeat-y }
Note:
但由于我们应用了不重复图象(no-repeat)规则,所以该图象不会重复平铺在整个段落后面,它只显示一幅单独的图象。如果你只想让图象垂直或者水平方向平铺,你以使用repeat-x将其水平平铺,用repaet-y将其垂直平铺。而repeat参数值则将图象从水平和垂直两个方向平铺。
> BODY { `background-attachment:` fixed }
Note:
在HTML中,背景图象通常会随页面的滚动而一起滚动。但利用CSS的固定背景(background)属性,你可以建立不滚动的背景图象,页面滚动时,背景图象可以保持固定。
### background-position
> P { `background-position`: center bottom }
Note:
当上述CSS规则应用于本段文字时,背景图象将在本段的中下部开始显示并向右平铺.