標籤:
15.1 CSS中背景的使用
屬性名稱 屬性值 說明
background-attachment scroll 設定背景映像會隨視窗滾動
條的移動而移動。
fixed 設定背景映像不會隨視窗捲軸
的移動而移動。
background-color 十六進位 background-color:#ff0000;
英文名稱 background-color:red;
三原色 background-color:rgb(255,0,0)
transparent background-color:transparent;透明
background-image URL background-image:url("bg.jpg")
背景圖片
none 不設定背景圖片
background-position top left 設定背景圖案出現在上左方。
top center 設定背景圖案出現在上方中間。
top right 設定背景圖案出現在上右方。
center left 設定背景圖案出現在中間左方。
center center 設定背景圖案出現在IE中間。
center right 設定背景圖案出現中間右方。
bottom left 設定背景圖案出現在下左方。
bottom 設定背景圖案出現在正下方。
bottom right 設定背景圖案出現在下右方。
background-repeat repeat 將背景圖案填滿整個背景。
repeat-x 將背景圖案在水平方向添滿。
repeat-y 將背景圖案在垂直方向添滿。
no-repeat 圖案只出現一次。
背景圖案簡化方案:
background:顏色 背景圖片 repeat attachment position
例:background:blue url("xxx.jpg") no-repeat fixed center center
15.2 CSS中列表的使用
屬性名稱 屬性值 說明
list-style-type none 無符號
disc 實體的小圓點。
circle 空心的小圓點。
square 實心的小方塊。
decimal 1,2,3...
lower-roman i,ii,iii...
upper-roman I,II,III...
lower-alpha a,b,c,d,e...
upper-alpha A,B,C,D,E...
list-style-position inside 清單項目較往右移。
outside 清單項目正常顯示。
list-style-image URL list-style-image:url(lmk.gif)
none 不會顯示任何圖象
清單的簡化設定:
list-style:circle inside url("bullet.gif")
CSS背景與列表