CSS中背景的使用
屬性名稱屬性值說明
background-attachmentscroll設置背景圖像會隨視窗滾動
條的移動而移動。
fixed設置背景圖像不會隨視窗滾動條
的移動而移動。
background-color十六進制background-color:#ff0000;
英文名稱background-color:red;
三原色background-color:rgb(255,0,0)
transparentbackground-color:transparent;透明
background-imageURLbackground-image:url("bg.jpg")
背景圖片
none不設置背景圖片
background-positiontop left設置背景圖案出現在上左方。
top center設置背景圖案出現在上方中間。
top right設置背景圖案出現在上右方。
center left設置背景圖案出現在中間左方。
center center設置背景圖案出現在IE中間。
center right設置背景圖案出現中間右方。
bottom left設置背景圖案出現在下左方。
bottom設置背景圖案出現在正下方。
bottom right設置背景圖案出現在下右方。
background-repeatrepeat將背景圖案填滿整個背景。
repeat-x將背景圖案在水平方向添滿。
repeat-y將背景圖案在垂直方向添滿。
no-repeat圖案只出現一次。
背景圖案簡化方案:
background:顏色 背景圖片 repeatattachment position
?CSS中列表的使用
屬性名稱 ? ? ? ? ? ? 屬性值 ? ? ? ? ? ? ? ? 說明
list-style-type ? ? ? ? ?none ? ? ? ? ? ? ? ? ? ? 無符號
? ? ? ? ? ? ?disc實體的小圓點。
? ? ? ? ? ? ? circle空心的小圓點。
? ? ? ? ? ? ? ? square實心的小方塊。
decimal1,2,3...
lower-romani,ii,iii...
upper-romanI,II,III...
lower-alphaa,b,c,d,e...
upper-alphaA,B,C,D,E...
list-style-position inside清單項目較往右移。
outside清單項目正常顯示。
list-style-imageURLlist-style-image:url(lmk.gif)
none不會顯示任何圖象
清單的簡化設置:
list-style:circle insideurl("bullet.gif")