標籤:
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="樣式檔案所在連結">
- <p class="x"> </p>
- 類別選取器:p.x{};;;;;;h1.x, p.x{};;;;;;.x{}
- 。。。。。。。。。。。。。。。。。。。。。。
- <p id="x"> </p>
- #x{}
- p#x{}
顏色:
背景映像
- background-image:url(映像連結);
- background-repeat:no-repeat(映像只會顯示一個);
- repeat;
- repeat-x(只在水平方向上重複)
- repeat-y(只在垂直方向上重複)
- inherit(按照父元素的設定來處理)
- background-position:top left;(左上方)
字型:
- font-family:Verdana(PC 上),Geneva(MAC),Arial(MAC和PC),sans-serif(無襯線字型集);
- font-size:以body的字型大小為準
- body{font-size:small;large}相當於基本字型大小
- h1{font-size:150%}
- color:
- font-weight:lighter;normal;bold;bolder;
text-decoration:
- non
- underline上劃線
- overline底線
- line-through有一條穿過的線
-
- 指定樣式的同時指定內容的含義:<del>{刪除};<ins>{底線,標記要插入的內容,填空?}
- font-style:italic(斜體);(not)oblique(傾斜文本)
段落
- line-heighe:1.6em;//各行之間的間距:[em:相對於字型大小]
盒模型
- 內容區
- padding:
- padding-left:
- padding-right:
- border
- border-width//邊框寬度
- border-style
- solid 實線
- double 兩條線
- outset外凸
- inset 內凹
- dotted 虛線
- dashed 破折線
- ridge 脊線
- border-color
- 合起來寫:3px dotted gray;
- 指定某一邊的邊框:border-top-color:……
- top;left;right;bottom
- 邊框圓角:radius(px或者em)
- margin
- margin-left:
- margin-right:
CSS基礎知識(更新中)