一. 字體屬性:(font)
1. 大小 {font-size: x-large;}(特大) xx-small;(極小) 一般中文用不到,只要用數值就可以,單位:PX、PD
2. 樣式 {font-style: oblique;}(偏斜體) italic;(斜體) normal;(正常)
3. 行高 {line-height: normal;}(正常) 單位:PX、PD、EM
4. 粗細 {font-weight: bold;}(粗體) lighter;(細體) normal;(正常)
5. 變體 {font-variant: small-caps;}(小型大寫字母) normal;(正常)
6. 大小寫 {text-transform: capitalize;}(首字母大寫) uppercase;(大寫) lowercase;(小寫) none;(無)
7. 修飾 {text-decoration: underline;}(下划線) overline;(上划線) line-through;(刪除線) blink;(閃爍)
二. 常用字體: (font-family)
"Courier New", Courier, monospace, "Times New Roman", Times, serif, Arial, Helvetica, sans-serif, Verdana
三. 背景屬性: (background)
1. 色彩 {}
2. 圖片 {background-image: none;}
3. 重復 {background-repeat: no-repeat;}
4. 滾動 {background-attachment: fixed;}(固定) scroll;(滾動)
5. 位置 {background-position: left;}(水平) top(垂直);
簡寫方法 {background:#000 url(..) repeat fixed left top;} /*簡寫·這個在閱讀代碼中經常出現.
四. 區塊屬性: (Block)
1. 字間距 {letter-spacing: normal;} 數值
2. 對齊 {text-align: justify;}(兩端對齊) left;(左對齊) right;(右對齊) center;(居中)
3. 縮進 {text-indent: 數值px;}
4. 垂直對齊 {vertical-align: baseline;}(基線) sub;(下標) sup;(上標) top; text-top; middle; bottom; text-bottom;
5. 詞間距word-spacing: normal; 數值
6. 空格white-space: pre;(保留) nowrap;(不換行)
7. 顯示 {display:block;}(塊) inline;(內嵌) list-item;(列表項) run-in;(追加部分) compact;(緊湊) marker;(標記) table; inline-table; table-raw-group; table-header-group; table-footer-group; table-raw; table-column-group; table-column; table-cell; table-caption;(表格標題) /*display 屬性的了解很模糊*/
五. 方框屬性: (Box)
1. width:; height:; float:; clear:both; margin:; padding:; 順序:上右下左
六. 邊框屬性: (Border)
1. border-style: dotted;(點線) dashed;(虛線) solid; double;(雙線) groove;(槽線) ridge;(脊狀) inset;(凹陷) outset; border-width:; 邊框寬度
border-color:#;
簡寫方法border:width style color; /*簡寫*/
七. 列表屬性: (List-style)
1. 類型list-style-type: disc;(圓點) circle;(圓圈) square;(方塊) decimal;(數字) lower-roman;(小羅碼數字) upper-roman; lower-alpha; upper-alpha;
2. 位置list-style-position: outside;(外) inside;
3. 圖像list-style-image: url(..);
Pexelshttps://www.wode007.com/sites/73241.html 天堂圖片網https://www.wode007.com/sites/73243.html
八. 定位屬性: (Position)
1.Position: absolute; relative; static;
visibility: inherit; visible; hidden;
overflow: visible; hidden; scroll; auto;
clip: rect(12px,auto,12px,auto) (裁切)
九. css文字屬性:
1. color : #999999; /*文字顏色*/
2. font-family : 宋體,sans-serif; /*文字字體*/
3. font-size : 9pt; /*文字大小*/
4. font-style:itelic; /*文字斜體*/
5. font-variant:small-caps; /*小字體*/
6. letter-spacing : 1pt; /*字間距離*/
7. line-height : 200%; /*設置行高*/
8. font-weight:bold; /*文字粗體*/
9. vertical-align:sub; /*下標字*/
10. vertical-align:super; /*上標字*/
11. text-decoration:line-through; /*加刪除線*/
12. text-decoration: overline; /*加頂線*/
13. text-decoration:underline; /*加下划線*/
14. text-decoration:none; /*刪除鏈接下划線*/
15. text-transform : capitalize; /*首字大寫*/
16. text-transform : uppercase; /*英文大寫*/
17. text-transform : lowercase; /*英文小寫*/
18. text-align:right; /*文字右對齊*/
19. text-align:left; /*文字左對齊*/
20. text-align:center; /*文字居中對齊*/
21. text-align:justify; /*文字分散對齊*/
vertical-align屬性
22. vertical-align:top; /*垂直向上對齊*/
23. vertical-align:bottom; /*垂直向下對齊*/
24. vertical-align:middle; /*垂直居中對齊*/
25. vertical-align:text-top; /*文字垂直向上對齊*/
26. vertical-align:text-bottom; /*文字垂直向下對齊*/
十. css邊框空白
1. padding-top:10px; /*上邊框留空白*/
2. padding-right:10px; /*右邊框留空白*/
3. padding-bottom:10px; /*下邊框留空白*/
4. padding-left:10px; /*左邊框留空白