彙整自網路,轉載請註明出處。
備忘筆記,不定時更新。
參考自
CSS 教學。
文字書寫方向(direction):
屬性 |
檢視 |
direction: ltr; |
文字從左到右 |
direction: trl; |
文字從左到右 |
文字間隔(letter-spacing):
屬性 |
檢視 |
letter-spacing: 10px; |
文字之間的間隔 |
letter-spacing: normal; |
文字之間內定值 |
每行的空間高度(line-height):
屬性 |
檢視 |
line-height: 500%; |
行的空間高度 |
line-height: 100%; |
行的空間高度 |
文字對齊(text-align):
屬性 |
檢視 |
text-align: left; |
文字靠左 |
text-align: center; |
文字置中 |
text-align: right; |
文字靠右 |
text-align: justify; |
一段句子文字,每一列都同寬,左右兩邊是筆直的 |
指定文字裝飾線(decoration):
屬性 |
檢視 |
text-decoration: overline; |
裝飾線在文字上緣 |
text-decoration: line-through; |
裝飾線在文字中間 |
text-decoration: underline; |
裝飾線在文字底部 |
文字首字縮排(text-indent):
屬性 |
檢視 |
text-indent: 30px; |
這段句子的首字位置內縮了句子的首字位置內縮了 |
英文字母變化(text-transform):
屬性 |
檢視 |
text-transform: capitalize; |
小夫妻 forever(第一個字母以大寫呈現,其他則不改變) |
text-transform: uppercase; |
小夫妻 forever(全部英文字母全數以大寫呈現) |
text-transform: lowercase; |
小夫妻 forever(全部英文字母全數以小寫呈現) |
字與字之間的距離(word-spacing):
屬性 |
檢視 |
word-spacing: 20px; |
Hello how are you(英文單字間的距離) |
元素內的空白鍵(white-space):
屬性 |
檢視 |
white-space: nowrap; |
指定段落中內文不進行換行 |
white-space: pre; |
空白 會被瀏覽器保留 |
white-space: pre-line; |
合併 空白符序列,但是保留換行符 |
white-space: pre-wrap; |
保留 空白符序列,但是正常地進行換行 |
圖片與文字垂直對齊(vertical-align):
vertical-align屬性值有 baseline、sub、super、top、text-top、middle、bottom、text-bottom、數字px、數字cm、數字%。
屬性 |
檢視 |
img style="vertical-align: text-top;" src="圖片" |
文字與圖的垂直對齊 |
img style="vertical-align: middle;" src="圖片" |
文字與圖的垂直對齊 |
img style="vertical-align: text-bottom;" src="圖片" |
文字與圖的垂直對齊 |
table 平均分配欄寬(table-layout):
屬性 |
檢視 |
table-layout: fixed |
1 |
2 |
3 |
邊框線條樣式(border):
屬性 |
檢視 |
border-style: solid; |
實線 |
border-style: dotted; |
點線 |
border-style: dashed; |
虛線 |
border-style: double; |
雙線 |
border-style: groove; |
凹線 |
border-style: ridge; |
凸線 |
border-style: outset; |
浮出線 |
border-style: inset; |
嵌入線 |
留言
張貼留言