Cssword-break: break-all and word-wrap: break-word can automatically wrap the content of a container such as DIV. However, there is a difference between the two. This article introduces the difference between css automatic line feed word-break: break-all and
Word-break: Break-all and word-wrap: Break-word can automatically wrap the content of a container such as Div.
Their differences are:
1. Word-break: Break-ALL: for example, if the DIV width is PX, its content will be automaticall
In css3, word-wrap is allowed in the word and how to deal with the word-break, css3word-wrap
First, let's talk about the default behavior of the browser. When a long word is too long to exceed its region, it is first moved to the
---restore content starts---An analysis of WORD-BREAK|OVERFLOW-WRAP|WORD-WRAP--CSS English segmentationToday in learning overflow properties again, when viewing the effect, see the following results, content in the Div China, but the content of the two P element is not wrapped, search for a system to find the answer, t
Text wrap: word-wrap, word-break, and white-space,
Synchronize this article to public number: http://mp.weixin.qq.com/s? _ Biz = MzAxMzgwNDU3Mg == mid = 401671055 idx = 1 sn = b88c986e61708da0027fac035ad36f0f # rd
If you are interested in subsequent articles, add the following:
The text is not fully displayed in som
English text more than fixed width, do not change their own line of question must have met, in the past is used Overflow:hidden or JavaScript to control, when CSS3 appear, we can use CSS3 text line word-wrap to solve this problem
We sometimes encounter English text more than fixed width in the production, do not change their own line of issue. This sort of problem is mostly controlled by Overflow:hidden o
1 in the Android camera code is to get the camera hardware parameters, print out a line, even if the use of Notepad wrap is not good to watch the followingRdcamerasdk=true;capture-burst-interval-max=10;zoom=0;redeye-reduction-values=;qc-ext-mode=none; max-num-detected-faces-hw=5;scene-detect-values=off,on;qc-camera-features=1;ext-mode-pip-picture-num=0; Face-detection-values=off,on;whitebalance=auto;max-sha
Word-wrap: Allows splitting of long, indivisible words and wrapping to the next line. (same effect in English and Chinese)Word-wrap has two values:1. Word-wrap:normal: line breaks only allowed hyphenation points (the browser keeps the default processing).2,
Text Box continuous inputNumber "111111111111111111" orThe English word "adkjsakfjsalfkjsalkdjaslkfjsalkf"What will happen? --- Text overflow. The general solution is to use overflow: hidden to hide text. Is there a better solution to text? For children's shoes of QA, automatic line breaks are required.Use word-wrap: break-word.Explanation in the css ManualWord-w
The following are the support scenarios for common browsers:
Face is the support of common browsers:
IE6/7/8[1]
FIREFOX2/3[2]
Firefox3.5
opera9+
Safari9.5+/chrome
{Word-wrap:break-word;}
TD elements need to set their widthSee Example 4 and Case 5
does not support
TD Element not supportedSee Example 4 and Case 5
does not support
TD Element not
Word-wrap: Allows splitting of long, indivisible words and wrapping to the next line. (same effect in English and Chinese)Word-wrap has two values:1. Word-wrap:normal: line breaks only allowed hyphenation points (the browser keeps the default processing).2,
Today, I encountered a text line break in TD text, and found that the text is: white-space: nowrap, that is, force text not to wrap. By the way, I checked the text line feed attribute word-wrap, which is summarized as follows: the default value of white-space is normal and the line feed is automatically generated. Word
Today encountered TD text content does not wrap, found that: White-space:nowrap, that is, forced text does not wrap, by the way, the text wraps the property Word-wrap, summarized as follows:
The default for White-space is normal, which wraps itself.
Word-break:break-all a
This article mainly introduces about CSS (Word-wrap/break) so that the pure English digital automatic line-wrapping, has a certain reference value, now share to everyone, the need for friends can refer to
In IE and FF will support large containers, will not automatically wrap and when the number or English with Chinese characters, will be changed from the Chines
The default value of white-space is normal and the line feed is automatically generated.Word-break: break-all and word-wrap: break-word indicate forced line breaks. If the former is too long, it is automatically truncated. Otherwise, the entire English word will wrap!However
ProblemWhen a block element that defines the width is filled with all plain English or pure numbers, it will hold large containers in IE and FF, do not wrap automatically, and when numbers or English characters are in Chinese, they will be wrapped in Chinese characters, while pure Chinese characters can be automatically wrapped. How to solve this problem? Let's meet two characters Word-
1,word-break:break-all For example div width 200px, its content will go to 200px automatically wrap, if the line end has an English word very long (congratulation, etc.), it will truncate the word, into the line end of Conra ( Congratulation the front end part of the next behavior tulation (conguatulation) the back end
Word-wrap:First of all, Word-wrap this CSS property in CSS3 has been renamed to Overflow-wrap, so semantic is also to avoid confusion with word-break;
Reference:
The property was overflow used to specify whether or not the browser could break lines within
CSS in the mention of word breaking, the first to be reflected in the mind is the Word-break and word-wrap these two attributes. But what's the difference between these two properties, and how compatible, I've always had a vague concept. Take the time today to make a note of the difference between these and the new bre
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.