TextBox Automatic line wrapping Problem _textbox

Source: Internet
Author: User

This is not going to work either/r/n or <br/> to identify, but through CSS properties to set. When you enter a multiline text box, the line wraps automatically, and when you read the assignment from a large line of text, you can't wrap the line, this solves the problem:

Add the following three important properties:

columns= "textmode=" "MultiLine" style= "Word-wrap:break-word;height:80px;word-break:break-all;"

You can wrap lines automatically. Another css2.0 Property Description:

Word-wrap

Syntax: Word-wrap:normal | Break-word

Value: Normal:  default value. Allows content to top open the specified container boundary Break-word:  content wraps within the boundary. If necessary, word wrapping (Word-break) will also occur.
Description: Sets or retrieves whether a career change is broken when the current row exceeds the bounds of the specified container.
This property is used only for layout-like objects, such as block objects. Inline elements to use this attribute, you must first set the height or width property of the object, or set the Position property to absolute, or set the display property to block.
This property is read-only for Currentstyle objects. is writable for other objects.
The corresponding script attribute is wordwrap.

Example: div {word-wrap:break-word; word-break:break-all;}


Word-break

Syntax: Word-break:normal | Break-all | Keep-all

Take value:

Normal:  default value. Allow wrapping between words Break-all:  This behavior is the same as normal for Asian languages. Also allows any word in a non-Asian text line to be disconnected. This value is appropriate for Asian text keep-all containing some non-Asian text:  is the same as for all non-Asian languages. For Chinese, Korean, Japanese, word is not allowed to break. Non-Asian text for small amounts of Asian text
Description: Sets or retrieves the word wrapping behavior within the text within an object. Especially when it comes to multiple languages.
For Chinese, you should use Break-all.
This property is read-only for Currentstyle objects. is writable for other objects.
The corresponding script attribute is wordbreak.

Example:
div {word-break:break-all;}

Blog Park Avenue to Jane

http://www.cnblogs.com/jams742003/

Reprint Please specify: Blog Park

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.