萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 程式設計 >  >> 網頁製作 >> Div CSS 教學

CSS 文字屬性:text-justify 兩端對齊演算法選擇

語法

text-justify: auto | inter-word | newspaper | distribute | distribute-all-lines | inter-ideograph;

參數詳解

值行為
auto瀏覽器自動決定兩端對齊規則
inter-word增加字與字間空格,最快,最後一行不生效
newspaper增減字/字母間空格,拉丁字母最精確
distribute類似 newspaper,適用東亞文檔(特別是泰文)
distribute-all-lines同 distribute,但包含段落最後一行,適用表意字
inter-ideograph表意字全兩端對齊,增減表意字與詞間空格

說明

設定或檢索對象內文本的對齊方式。對應腳本特性 textJustify。

範例

div { text-justify: auto; }
copyright © 萬盛學電腦網 all rights reserved