CSS常用語法
- 文章分類: 學CSS
- 10/4/2010
| 語法 | 說明 | 設定值 |
| width | 寬度 | px、% |
| height | 高度 | px、% |
| background | 背景 | #色碼 #色碼 url(位置) |
| color | 文字顏色 | #色碼 |
| font-size | 文字大小 | px |
| Font-weight | 文字粗細 | 400、800 |
| font-family | 字型 | Arial、細明體…等 |
| text-align | 對齊 | left:靠左對齊 right:靠右對齊 center:向中間對齊 justified:左右對齊 |
| text-decoration | 樣式 | underline:文字下加上一條線。 overline:文字上加上一條線。 line-through:文字中間加上一條線劃過去。 blink:讓文字閃爍。 |
| line-height | 行高 | px |
| list-style | 項目符號 | none:沒有 disc:全黑圓圈 circle:空心圓圈 square:正方形 |
| border | 外框 | px |
| margin | 間距 | px、%、auto |
| padding | 內距 | px、%、auto |
| display | 顯示 | block、inline、none |
| position | 位置 | static absolute relative fixed |
| float | 浮動 | left、right、none |