css text-wrap property


  Translation results:

text

English[tekst] American[tɛkst]

n. Text, original text; text, textbook; theme; version

v .Send a text message

wrap

英[ræp] 美[ræp]  

vt. To wrap; to wrap; to wrap (or bandage, cover) etc.); cover

n. lap blanket, shawl, scarf, scarf, turban, blouse, jacket, coat; wrapping paper; confidential

vi. entwined, coiled (usually with over, around, etc. used together); wrap up, wrap up; put on (clothes, etc.)

css text-wrap propertysyntax

Function:The text-wrap attribute specifies the line wrapping (wrap) rules for text.

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

Explanation: normal Only performed at allowed line breaks Line break. None No line breaks. Text that the element cannot fit will overflow. unrestricted Wraps a new line between any two characters. suppress suppresses line breaks in elements. Browsers only wrap lines if there are no other valid break points in the line.

Note: Currently mainstream browsers do not support the text-wrap attribute.

css text-wrap propertyexample

<!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>
Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A