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>
运行实例 »

点击 "运行实例" 按钮查看在线实例

热门推荐