文本周圍要留充足空間。
文本背景不要與文本周圍的彩色介面(框架、其他元素背景或頁面邊框)所混淆。(比如表格單元內字體與邊框之間要留有間距。)
兩個文本塊(比如段落)的垂直間距必須大於單個文本塊的行高。同樣,水準間距至少是單詞間距的兩倍。
只有絕對尺寸或者相對單位可以用來定義文字大小,...
設計師只能定義絕對(使用 CSS 關鍵字 xx-small
, x-small
, small
, medium
, large
, x-large
and xx-large
)字體大小,或者相對其他元素的字體大小(smaller
, larger
, 百分比 和 em
以及 ex
單位值)。絕對單位(pt
, cm
, mm
, in
, pc
)只適用於紙媒體(比如印刷品)。不能將 px
單位用於字體尺寸。
... 文字尺寸不能小於xx-small。
此限制適用於字體相對大小,設計師必須要重視下面的表格資料:
CSS sizes ratios | xx-small | x-small | small | medium / default |
large | x-large | xx-large |
---|---|---|---|---|---|---|---|
xx-small | 100% | 125% | 148,33% | 166,67% | 200% | 250% | 333,33% |
x-small | 80% | 100% | 118,67% | 133,33% | 160% | 200% | 266,67% |
small | 67,42% | 84,27% | 100% | 112,36% | 134,83% | 168,54% | 224,72% |
medium / default |
60% | 75% | 89% | 100% | 120% | 150% | 200% |
large | 50% | 62,5% | 74,17% | 83,33% | 100% | 125% | 166,67% |
x-large | 40% | 50% | 59,33% | 66,67% | 80% | 100% | 133,33% |
xx-large | 30% | 37,5% | 44,5% | 50% | 60% | 75% | 100% |
實例:比如一個元素被設置成 large
尺寸,那麼 xx-small
的數值就是它的 50 % 大小。large
尺寸大小必須至少是派生字體尺寸大小(0.5em
)的 50%
。當元素尺寸並未指定時,它的默認尺寸大小是 medium
。
小字體尺寸很少被使用,只用於輔助頁面元素。頁面字體尺寸至少要大於 small
。
當網頁內容用於螢幕輸出或者列印時,字體必須在訪客輸出設備(通用列印類型)上可用。
CSS中定義的 font-family
最終值必須為 serif
, sans-serif
, monospace
, cursive
或者 fantasy
中的一個。