《資訊》常用CSS語法介紹
1.文字屬性一覽:
color:#999999; [ 文字色彩 ]
font-family:細明體,serif; [ 文字字型(由前往後有順序性) ]
font-size:9pt; [ 文字大小(單位有pt/px/em/%) ]
font-style:itelic/oblique/normal; [ 文字樣式:斜體/斜體/正常 ]
font-variant:small-caps/normal; [ 小寫字體:小寫/正常 ]
letter-spacing:1pt; [ 字元間距(單位有pt/px/em/%) ]
line-height:200%; [ 設定行高(單位有pt/px/em/%) ]
font-weight:bold/normal; [ 文字粗細:粗體/正常 ]
vertical-align:top/middle/botton/baseline/super/sub; [ 文字垂直位置:靠上/置中/靠下/一般位置/上標/下標 ]
text-decoration:line-through/overline/underline/none; [ 文字效果:加刪除線/加頂線/加底線/正常 ]
text-transform:capitalize/uppercase/lowercase; [ 英文大小寫:首字大寫/全部大寫/全部小寫 ]
text-align:left/center/right; [ 文字水平位置:靠左對齊/置中對齊/靠右對齊 ]
2.背景語法:
background-image:url(image/bg.gif); [ 背景圖片 ]
background-repeat:no-repeat/repeat-x/repeat-y; [ 不重複排列/水平重複/垂直重複 ]
background-position:90% 90%; [ 背景圖片x與y軸的位置 ]
background-attachment:fixed/scroll; [ 固定背景/隨捲軸移動 ]
background-color:#F5E2EC; [ 背景色彩 ]
3.連結屬性語法:
A [ 所有超連結 ]
A:link [ 超連結文字格式 ]
A:visited [ 瀏覽過的連結文字格式 ]
A:active [ 按下連結的格式 ]
A:hover [ 滑鼠移至連結 ]
4.其他屬性:
A.框線設定:
border : 1px dotted #cc3300; [ 框線粗細/樣式/顏色 ]
框線樣式還有:
solid:直線
double:雙線
dotted:虛線
groove:凹線
ridge:綾線
insert:立體下凸
outset:立體上凸
dashed:破折線
none:不設定框線
B.滑鼠指標樣式一覽:
cursor:crosshair; [ 十字型 ]
cursor:s-resize; [ 箭頭朝下 ]
cursor:move; [ 十字箭頭 ]
cursor:e-resize; [ 箭頭朝右 ]
cursor:help; [ 加一問號 ]
cursor:w-resize; [ 箭頭朝左 ]
cursor:n-resize; [ 箭頭朝上 ]
cursor:ne-resize; [ 箭頭朝右上 ]
scursor:nw-resize; [ 箭頭朝左上 ]
cursor:text; [ 文字I型 ]
cursor:se-resize; [ 箭頭斜右下 ]
cursor:sw-resize; [ 箭頭斜左下 ]
cursor:wait; [ 漏斗 ]
cursor:nono; [ 預設 ]
C.彩色捲軸:
<style type=text/css>
<!--
BODY{
SCROLLBAR-FACE-COLOR:#FFFFFF; [ 捲軸顏色 ]
SCROLLBAR-HIGHLIGHT-COLOR:#336699; [ 捲軸左與上內邊框 ]
SCROLLBAR-SHADOW-COLOR:#336699; [ 捲軸右與下內邊框 ]
SCROLLBAR-3DLIGHT-COLOR:#FFFFFF; [ 捲軸左與上外邊框 ]
SCROLLBAR-DARKSHADOW-COLOR:#FFFFFF; [ 捲軸右與下外邊框 ]
SCROLLBAR-ARROW-COL
}