標籤:style color io os 使用 ar 2014 sp on
一、前景與背景
background-color: 背景色,定義背景的顏色
background-image:url() 定義背景圖片
background-attachment:fixed/scroll 定義背景圖片隨捲軸的移動方式
background-repeat:repeat/no-repeat/repeat-x/repeat-y 定義背景圖片的重複方式
background-position:left 10px bottom 20px; 定義背景圖片的位置
font-family: 定義使用的字型
font-size: 定義字型的大小(常用字型大小:12px 14px)
font-weight: 定義字型的粗細(normal:正常 bold:粗體)
font-style: 定義字型顯示的方式(normal:正常 italic:斜體)
color: 前景色彩定義文字的顏色
text-decoration: 定義文本是否有劃線以及劃線的方式(underline 底線 ,overline 上劃線,line-through 刪除線,blink 閃爍,初始值:none 無劃線)
text-indent: 定義文本首行的縮排(在首行文字之前插入指定的長度)(em 倍,百分比)
text-align: 定義文本的對齊( left | right | center)
vertical-align: 豎直對齊
line-height: 行高
二、邊界與邊框
border:border-style,border-width,border-color,border-top,border-right,border-bottom,border-left 定義四個邊的寬度,樣式,顏色(1px solid red 1像素紅色實線)
margin:margin-top,margin-right,margin-bottom,margin-left 定義邊外補白,只有寬度width一種屬性
padding:padding-top,padding-right,padding-bottom,padding-left 定義邊內補白,只有寬度width一種屬性
三、列表與方塊
top:
right:
bottom:
left:
width:
height:
list-style-type:circle/disc/alpha/none 定義列表樣式 圓圈/點/字母/無樣式
list-style-image:url() 定義列表樣式圖片
list-style-position:inside/outside 定義列表樣式的位置 內部/外部
四、格式與布局
position:fixed(產生絕對位置的元素,相對於瀏覽器視窗進行定位。 )/absolute(產生絕對位置的元素,相對於 static 定位以外的第一個父元素進行定位。 )/relative(產生相對定位的元素,相對於其正常位置進行定位。 ) -------------top,right,bottom,left
z-index:
float:left,right 向左浮動,向右浮動
clear:both 規定元素的哪一側不允許其他浮動元素,both在左右兩側均不允許浮動元素。
display:顯示方式。block/inline/none/inline-block block此元素將顯示為區塊層級元素,此元素前後會帶有分行符號。(塊)在span層會起作用inline預設。此元素會被顯示為內嵌元素,元素前後沒有分行符號。在一行上。none此元素不會被顯示。inline-block行內塊元素。
visibility:可視性。hidden元素是不可見的。 ,visible預設值。元素是可見的。
五、超連結的
a:link 沒訪問過的
a:visited 訪問過的
a:hover 滑鼠放上變的顏色
2014.9.20CSS樣式表