Three CSS related to text wrapping:
1 white-space
Attribute setting: how to process the blank space in the element.
This attribute declares how to process the blank characters in the element during layout creation.
Possible values:
Normal: The default value is ignore. The blank line character is ignored. Automatic line feed with no scroll bars
Pre: retain blank characters; Retain line breaks, that is, retain the original format
Nowrap:
Php text to image wrap method. Today, when I accidentally browsed the web, I found a long microblog that could convert text into png images. so I decided to study the PHP text conversion method, in fact, as long as a long microblog is found when PHP extensions are used to browse the web page accidentally today, it can
When we set my div, or a fixed width of another text box, the text will overflow (shown outside the area without wrapping).At this point we can use several of the CSS in the solution. There are three of the following that can solve the problem:The 1,word-break property specifies how the wrap is handled.Word-break:normal|break-all|keep-all;Value DescriptionNormal
By judging the string and intercepting the string and then splicing it together, the text image will automatically wrap the line. the following code is used to paste the text into a png image when you accidentally browse the web page, as a matter of fact, as long as the PHP Extension library is used, the GD library is used to generate images, and then the image f
In development, it is easy to encounter the problem of text exceeding in Div. Here we summarize the following methods:
White-spaceAttribute setting: how to process the blank space in the element. This attribute declares how to process the blank characters in the element during layout creation. All browsers support the white-space attribute.
Note: any version of Internet Explorer (including IE8) does not support the attribute value "inherit ".
Today, when I accidentally browsed the web page, I found a long microblog that could convert text into png images, so I just studied the PHP text conversion method. In fact, as long as I used the PHP extension library, the GD library is used to generate images, and then the image function is used to generate images. After the code is written, it is found that if there are too many texts, the image will exce
"Problem description"
The drawstring in the Javame graphics class does not support text wrapping, so when you draw a longer string, the text is drawn on the same line, and the string that exceeds the screen portion is truncated. How do I make text that is drawn automatically wrap?
Analysis
DrawString cannot implemen
The text wrapping property is newly defined in CSS3, Word-wrap:
The Nomal property value indicates that continuous text wrapping is controlled.
The Break-word property value indicates that the content will wrap within the bounds. Word Wrapping (Word-break) also occurs if desired.
Comparative analysis
Automatic line-wrapping problem, normal character line is more reasonable, and continuous digital and English characters are often the container brace big, it is a headache, the following is how CSS to achieve change
Method of the line
For block-level elements such as Div,pLine wrapping for normal text (Asian and non-Asian text) elements have default white-space:normal, and
In the process of data processing today, in the database used a \ n line-break symbol, the purpose is to do in the same table data multi-line display, such as
Field Name 1
Field Name 2
Field Name 3
1
Data rowData two rowsData three rows
The example is the result after the SQL query
2
Example above
Data not exported
Originally after the SQL query is so displayed, but later exported
1. Make text wrap by browserThe browser itself comes with the ability to wrap text in its own line.2. Specify how the line wrap is handledIn CSS3, you can use the Word-break property to decide for yourself how to handle the wrap.div{Word-break:break-all;}
The value
1. You will die the width of the table, which gives the table a width value (is the value, not the percentage)2. Force No Line breakdiv{White-space: Do not wrap, normal default; nowrap forces all text to be displayed in the same line until the text ends or the BR object is encounteredWhite-space:nowrap; }Wrap Linediv{W
Why does the text layout of Android TextView wrap appear uneven?
Today, there is no progress in the project, and there is a problem in the background of the company. After reading the notes when I was learning Android, I found that TextView will automatically wrap and the typographical text is uneven. I checked the inf
Today, when I accidentally browsed the web page, I found a long microblog that could convert text into png images, so I just studied the PHP text conversion method. In fact, as long as I used the PHP extension library, the GD library is used to generate images, and then the image function is used to generate images. After the code is written, it is found that if there are too many texts, the image will exce
Use JavaScript to wrap text element nodes and javascript nodesOriginal article link: Wrapping Text Nodes and Elements with JavaScript original Article Date: Translated by: TieWhen your application depends on a specific JavaScript class library, you will always try to solve the problems of some class libraries rather than the language. For example, when I try to
Original link: Wrapping Text Nodes and Elements with JavaScript original date: 2014-09-04 translation Date: 2014-09-06 Translator: AnchorWhen your application relies on a particular JavaScript class library, you inadvertently try to solve some of the library's own problems, not the language. Just like when I try to wrap the text (which may also contain HTML eleme
1.style>Div{White-space:Normal;Word-break:Break-all;Word-wrap:Break-word; } style> Divstyle= "width:100px; border:1px solid Red">I am a DOIBIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIDiv>Pre-CSS effect:-------> Add Effect:2. These three sentences focus on: Word-break and Word-wrapThe A:word-break property specifies how the wrap is handled.tip : By using the Word-break property, you can let your browser implement line breaks anywhere.
First, for the Div force line break1. (ie browser) white-space:normal; Word-break:break-all; The former follows the standard.#wrap {white-space:normal; width:200px;}Or#wrap {word-break:break-all;width:200px;}2. (Firefox browser) white-space:normal; Word-break:break-all;overflow:hidden;The same FF also does not have a good implementation method, can only hide or add scroll bar, of course, no scroll bar effec
When you use Excel to edit a report, you enter text that exceeds the width of the cell in a cell, but the program does not wrap, but continues typing on the same line.
This problem is not the fault of Excel itself, but the wrong setting for Excel. The solution is simple, just turn on Excel's automatic wrapping function. Set the steps as follows:
1. In excle, select format → cell to open the Format Cells d
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.