text
英[tekst] 美[tɛkst]
n.文本,原文;課文,教科書;主題;版本
#v .傳簡訊
wrap
英[ræp] 美[ræp]
vt.包;纏繞;用…包裹(或包紮、覆蓋等等);掩護
n.膝毯,披肩,圍巾,圍脖,頭巾,罩衫,外套,大衣;包裝紙;〈俚〉機密
vi.纏繞,盤繞(通常與over, around 等連用);包上,裹上;穿上(衣服等)
css text-wrap屬性 語法
作用:text-wrap 屬性規定文字的換行(折行)規則。
語法:text-wrap: normal|none|unrestricted|suppress
說明:normal 只在允許的換行點進行換行。 none 不換行。元素無法容納的文字會溢出。 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>#點擊 "執行實例" 按鈕查看線上實例
