Latest web development tutorials

CSS3 text-wrap 屬性

實例

Allow no line breaks:

p.test {text-wrap:none;}

嘗試一下»

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

任何主流瀏覽器都不支持text-wrap屬性。


屬性定義及使用說明

text-wrap屬性指定文本換行規則。

默認值: normal
繼承: yes
版本: CSS3
JavaScript 語法: object.style.textWrap="none"


語法

text-wrap: normal|none|unrestricted|suppress;

描述
normal 只在允許的換行點進行換行。
none 不換行。 元素無法容納的文本會溢出。
unrestricted 在任意兩個字符間換行。
suppress 壓縮元素中的換行。 瀏覽器只在行中沒有其他有效換行點時進行換行。