text

英 [tekst]? ?美 [t?kst]??

n.文本,原文;課文,教科書;主題;版本

v.發(fā)短信

wrap

英 [r?p]? ?美 [r?p]??

vt.包;纏繞;用…包裹(或包扎、覆蓋等);掩護

n.膝毯,披肩,圍巾,圍脖,頭巾,罩衫,外套,大衣;包裝紙;〈俚〉機密

vi.纏繞,盤繞(通常與 over, around 等連用);包上,裹上;穿上(衣服等)

css text-wrap屬性 語法

作用:text-wrap 屬性規(guī)定文本的換行(折行)規(guī)則。

語法:text-wrap: normal|none|unrestricted|suppress

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

注釋:目前主流瀏覽器都不支持 text-wrap 屬性。

css text-wrap屬性 示例

<!DOCTYPE html>
<html>
<head>
<style> 
p.test1
{
width:11em; 
border:1px solid #000000;
text-wrap:none;
}
p.test2
{
width:11em; 
border:1px solid #000000;
text-wrap:normal;
}
</style>
</head>
<body>
<p class="test1"> This paragraph contains some text. This line should not breake or wrap to the next line.</p>
<p class="test2"> This paragraph contains some text: The line breaks as normal.</p>
<p><b>注釋:</b>目前主流瀏覽器都不支持 text-wrap 屬性。</p>
</body>
</html>
運行實例 ?

點擊 "運行實例" 按鈕查看在線實例