標籤:tac idg 虛線 顏色 重複 repeat 之間 固定 距離
今天和大家分享一下有關css中的一些常用的屬性和屬性值:
①顏色屬性 color ②background 背景屬性 其屬性值有:
1,Background-image: 背景圖片
2,Background-repeat: 背景重複
Repeat-x(x軸方向重複) | repeat-y(y軸方向重複) |no-repeat(不重複)
3,Background-attachment: 背景附件 scroll(預設值) fixed(固定)
4,Background-position:背景位置
Left|center|right( 橫向)
T op|center|bottom(縱向)
像素
(注意:background-position 兩個值之間需要使用空格隔開)
Background:<背景顏色>|<背景圖片>|<背景重複>|<背景附件>|<背景位置>
每個屬性中間都要用空格隔開
③邊框屬性 1,border-style 邊框樣式 Border-top-style Border-left-style Border-bottom-style Border-right-style
屬性值有: dotted 點線 Dashed 虛線 Solid 實線 Double 雙實線 Groove 槽狀線 Ridge 脊線 Inset 內嵌效果 Outset 外凸效果
Border-width 邊框寬度 單位使用像素 同上
Border-color 邊框顏色 同上
Border:邊框寬度 邊框樣式 邊框顏色
④文字屬性 1,text-align 文本對齊 left|right|center 2,text-decoration 文本修飾 None(預設值) 通常我們使用這個屬性將a標籤的預設底線取消 Underline 定義文本下的一條線 Overline 定義文本上的一條線 Line-through 定義穿過文本中的一條線 3,line-height 設定行間距離(行高) 不允許出現負值 作用:用來將文本置中顯示 一般都是和設定的高度相同 讓文字垂直置中顯示
css中一些常用的屬性和屬性值