css常用小记
时间:2010-05-25 来源:admin126com
字型
文字顏色
color: #000;
文字大小
font-size: 8pt;
文字字體
font-family: “arial”, dotum;
文字斜體
font-style: italic;
小字體
font-variant: small-caps;
字間距離
letter-spacing: 1pt;
行高
line- (亦可為百分比)
文字粗體
font-weight: bold;
加底線
text-decoration: underline;
加刪除線
text-decoration: line-through;
加頂線
text-decoration: overline;
刪除連線底線
text-decoration: none;
首字大寫
text-transform: capitalize;
英文大寫
text-transform: uppercase;
英文小寫
text-transform: lowercase;
文字靠左
text-align: left;
文字靠中
text-align: center;
文字靠右
text-align: right;
文字分散對齊
text-align: justify;
背景 背景顏色
background: #e9e9e9;
背景圖片不重複
background: url(圖片位址) no-repeat;
背景重複
background: url(圖片位址) repeat;
背景Y軸重複
background: url(圖片位址) repeat-y;
背景X軸重複
background: url(圖片位址) repeat-x;
背景浮水印固定
background: url(圖片位址) fixed;
背景置中
background-position: center;
背景靠左
background-position: left;
背景靠右
background-position: right;
背景靠上
background-position: top;
背景靠下
background-position: bottom;
簡易寫法
background: url(位址) no-repeat top center fixed #fff;
●備註:位址請記得不是複製上方的網址,而是在圖片上方按右鍵內容裡的那個網址!
框線
全框線
border: 1px solid #000;
上框線
border-top: 1px solid #000;
下框線
border-bottom: 1px solid #000;
右框線
border-right: 1px solid #000;
左框線
border-left: 1px solid #000;
框線種類
solid 直線
dotted 點線
dashed 虛線
double 雙線
groove 立體內凸
ridge 立體浮凸
inset 凹框
outset 凸框
文字顏色
color: #000;
文字大小
font-size: 8pt;
文字字體
font-family: “arial”, dotum;
文字斜體
font-style: italic;
小字體
font-variant: small-caps;
字間距離
letter-spacing: 1pt;
行高
line- (亦可為百分比)
文字粗體
font-weight: bold;
加底線
text-decoration: underline;
加刪除線
text-decoration: line-through;
加頂線
text-decoration: overline;
刪除連線底線
text-decoration: none;
首字大寫
text-transform: capitalize;
英文大寫
text-transform: uppercase;
英文小寫
text-transform: lowercase;
文字靠左
text-align: left;
文字靠中
text-align: center;
文字靠右
text-align: right;
文字分散對齊
text-align: justify;
背景 背景顏色
background: #e9e9e9;
背景圖片不重複
background: url(圖片位址) no-repeat;
背景重複
background: url(圖片位址) repeat;
背景Y軸重複
background: url(圖片位址) repeat-y;
背景X軸重複
background: url(圖片位址) repeat-x;
背景浮水印固定
background: url(圖片位址) fixed;
背景置中
background-position: center;
背景靠左
background-position: left;
背景靠右
background-position: right;
背景靠上
background-position: top;
背景靠下
background-position: bottom;
簡易寫法
background: url(位址) no-repeat top center fixed #fff;
●備註:位址請記得不是複製上方的網址,而是在圖片上方按右鍵內容裡的那個網址!
框線
全框線
border: 1px solid #000;
上框線
border-top: 1px solid #000;
下框線
border-bottom: 1px solid #000;
右框線
border-right: 1px solid #000;
左框線
border-left: 1px solid #000;
框線種類
solid 直線
dotted 點線
dashed 虛線
double 雙線
groove 立體內凸
ridge 立體浮凸
inset 凹框
outset 凸框
相关阅读 更多 +