CSS样式(行间)
1. CSS文本樣式
以下內容均為填入<div><style> </div></style>中的樣式 <div style=“XXXX;”>
設置下劃線,刪除線,頂劃線 text-decoration:?樣式 屬性值: none 無 underline 下劃線 line-through 刪除線 overline 頂劃線
設置文本大小寫text-transform 屬性值: lowercase ? ??全小寫 capitalize ? ?單詞首字母大寫 uppercasee ? ?全大寫
設置小型大寫字母 font-variant:?字母狀態 屬性值: normal 正常狀態 small-caps 小型大寫字母
首行縮進 text-indent:縮進距離 屬性值: px,em,rem,百分比 文字默認字體大小16px 1em=16px=一個漢字的大小
文本水平對齊方式 text-align:?對齊方式 屬性值: left 左對齊(默認) center 居中對齊 right 右對齊
設置行高 line-height:?行高 屬性值: px,em,rem,百分比
設置字距/詞距 letter-spacing: 字母間距
word-spacing: 詞距
2.字體樣式
設置字體類型 font-family:?字體
設置字體粗細 font-weight:粗細 font-weight:設置字體粗細 屬性值: 可以用單詞也可以用數值 100 200 300 lighter normal 400 bold 700 bolder 800 900
設置字體樣式 font-style:樣式 屬性值: normal 正常字體 italic 斜體 oblique 字體傾斜
設置字體顏色 color:?顏色
3.背景樣式 設置背景顏色 background-color:?顏色
設置背景圖片 background-image:url(路徑)
設置圖片是否平鋪 background-repeat:是否平鋪 屬性值: repeat 平鋪(默認) no-repeat 不平鋪 repeat-x 只在水平方向平鋪 repeat-y 只在垂直方向平鋪
設置背景圖片的位置 background-position:?位置 屬性值: 1.left,right,top ,bottom,center兩兩組合的九個位置 2.? x% y%(百分比) 3.xpx ypx(像素值)
以下內容均為填入<div><style> </div></style>中的樣式 <div style=“XXXX;”>
設置下劃線,刪除線,頂劃線 text-decoration:?樣式 屬性值: none 無 underline 下劃線 line-through 刪除線 overline 頂劃線
設置文本大小寫text-transform 屬性值: lowercase ? ??全小寫 capitalize ? ?單詞首字母大寫 uppercasee ? ?全大寫
設置小型大寫字母 font-variant:?字母狀態 屬性值: normal 正常狀態 small-caps 小型大寫字母
首行縮進 text-indent:縮進距離 屬性值: px,em,rem,百分比 文字默認字體大小16px 1em=16px=一個漢字的大小
文本水平對齊方式 text-align:?對齊方式 屬性值: left 左對齊(默認) center 居中對齊 right 右對齊
設置行高 line-height:?行高 屬性值: px,em,rem,百分比
設置字距/詞距 letter-spacing: 字母間距
word-spacing: 詞距
2.字體樣式
設置字體類型 font-family:?字體
設置字體粗細 font-weight:粗細 font-weight:設置字體粗細 屬性值: 可以用單詞也可以用數值 100 200 300 lighter normal 400 bold 700 bolder 800 900
設置字體樣式 font-style:樣式 屬性值: normal 正常字體 italic 斜體 oblique 字體傾斜
設置字體顏色 color:?顏色
3.背景樣式 設置背景顏色 background-color:?顏色
設置背景圖片 background-image:url(路徑)
設置圖片是否平鋪 background-repeat:是否平鋪 屬性值: repeat 平鋪(默認) no-repeat 不平鋪 repeat-x 只在水平方向平鋪 repeat-y 只在垂直方向平鋪
設置背景圖片的位置 background-position:?位置 屬性值: 1.left,right,top ,bottom,center兩兩組合的九個位置 2.? x% y%(百分比) 3.xpx ypx(像素值)
總結
- 上一篇: 《软件质量保证与测试》学习笔记【第一章
- 下一篇: CSS hack:区分IE6 IE7 F