This CSS tutorial explains how to use the CSS property called word-wrap with syntax and examples. The CSS word-wrap property defines whether the browser is allowed to line break within words when a word is too long to fit within its container.
首先提一下,word-wrap 这个 CSS 属性在CSS3中已经被更名为 overflow-wrap,这样语义化也是为了避免与 word-break 混淆; Reference: Theoverflow-wrapproperty is used to specify whether or not the browser may break lines within words in order to prevent overflow when an otherwise unbreakable string is to...
Windows Internet Explorer 8. TheIHTMLStyle3::wordWrapattribute is an extension to CSS, and can be used as a synonym forword-wrapin IE8 Standards mode. Use this property to enable the browser to break up otherwise unbreakable strings.
It only has an effect when the white-space property allows wrapping. In CSS3, the word-wrap property is called overflow-wrap. Initial Value normal Applies to All elements. Inherited Yes. Animatable No. Version CSS3 DOM Syntax object.style.wordWrap = "break-word"; Syntax word-wrap: normal...
Property values String format CSS information 顯示其他 5 個 Specifies whether to break words when the content exceeds the boundaries of its container. Syntax 複製 HRESULT value = object.put_wordWrap( v);HRESULT value = object.get_wordWrap(* p); ...
CSS | word-wrap 属性 CSS | word-wrap Property CSS 中的 word-wrap 属性用于分断长单词并换行到下一行。它定义了当内容超出其容器边界时是否分词。 语法: word-wrap:normal|break-word|initial|inherit; 属性值: normal:默认值,只能在正常断点(空格、非字母数字字符等)处换行。
word-wrap(overflow-wrap) word-wrap又叫做overflow-wrap: word-wrap 属性原本属于微软的一个私有属性,在 CSS3 现在的文本规范草案中已经被重名为 overflow-wrap 。 word-wrap 现在被当作 overflow-wrap 的 “别名”。 稳定的谷歌 Chrome 和 Opera 浏览器版本支持这种新语法。
Specifies whether the current line should break if the content exceeds the boundaries of its container. Note: The word-wrap property is supported in Firefox from version 3.5.
css的 word-wrap 属性用来标明是否允许浏览器在单词内进行断句,这是为了防止当一个字符串太长而找不到它的自然断句点时产生溢出现象。 word-break: css的 word-break 属性用来标明怎么样进行单词内的断句。 貌似从上面两个读着都蛋疼的翻译中找到了一些区别:word-wrap 强调的是是否允许单词内断句,而word-break强...
word-wrap(overflow-wrap) word-wrap 又叫做 overflow-wrap : word-wrap 属性原本属于微软的一个私有属性,在 CSS3 现在的文本规范草案中已经被重名为 overflow-wrap 。word-wrap 现在被当作 overflow-wrap 的 “别名”。稳定的谷歌 Chrome 和 Opera 浏览器版本支持这种新语法。