css word-wrap

Definition:

定义:

What is the most fundamental element that comes to mind when you are considering to develop a web page? Words! If that was your answer, then pat yourself because you are already aware of what we are going to discuss in this article. The discussion here will revolve around the most basic aspect of web development that is "dealing with words". But what are we going to discuss about the words here? That property is known as word-break in CSS but we won't be discussing the word-break property rather the focus here is on the word-break property's values and which are Break-all and Break-word.

在考虑开发网页时,想到的最基本要素是什么? 话! 如果是您的答案,请轻拍一下,因为您已经知道我们将在本文中讨论的内容。 这里的讨论将围绕Web开发的最基本方面,即“用词处理”。 但是,我们将在这里讨论这些单词呢? 该属性在CSS中被称为断字,但我们将不讨论断字属性,而是将重点放在断字属性的值上,即Break-all和Break-word。

In this article, what we are trying to do is give web developers a better understanding of the Word-Break property based on its values. Learning about the property and the values that property upholds is equally important. As they say, incomplete knowledge is worse than no knowledge at all, therefore learning about the values of the word-break property is of the essence. Therefore, we will see the difference between the two values of the word-break property is CSS which are break-all and break-word.

在本文中,我们试图做的是让Web开发人员根据其值更好地理解Word-Break属性。 了解财产和财产所坚持的价值同样重要。 正如他们所说,不完整的知识总比没有知识差,因此,了解分词属性的值至关重要。 因此,我们将看到word-break属性的两个值之间的区别是CSS,即break-all和break-word。

全力以赴 (break-all)

The first and foremost value of the word-break property is the break-all value. This value as the name suggests helps in breaking words at any character and that again prevents overflow. Therefore, the sole purpose of this value as you would have already figured out is to break the component of a word so that overflow can be prevented. Not that tough to understand right? Well, implementation is also easy, go ahead and have a look at the example below.

单词中断属性的第一个也是最重要的值是全部中断值。 顾名思义,该值有助于破坏任何字符的单词,并再次防止溢出。 因此,您已经知道,此值的唯一目的是破坏单词的组成部分,从而可以防止溢出。 不难理解吗? 好吧,实现也很容易,请继续看下面的示例。

Syntax:

句法:

    element{
Word-break:break-all;
}

断词 (break-word)

The last but not the least, the break-word value is used to prevent overflow but here word may be broken at arbitrary points. Again, the break-word value has similar characteristics but here the word can be broken at arbitrary points or simply put at any random point. This value is also not that tough to understand, so why don’t we move ahead and have a look at an equally easy example.

最后但并非最不重要的一点是, 中断字值用于防止溢出,但此处的字可在任意点处中断。 再次,断词值具有相似的特征,但是这里的词可以在任意点处折断或简单地放在任意随机点处。 这个值也不难理解,所以我们为什么不继续前进,看看同样简单的例子。

Syntax:

句法:

    element{
word-break: break-word;
}

In the below example, you can see the difference between both the values of the property.

在下面的示例中,您可以看到两个属性值之间的差异。

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
.break-word {width: 180px;
border: 1px solid #006969;
word-break: break-word;
}
.break-all {width: 180px;
border: 1px solid #006969;
word-break: break-all;
}
</style>
</head>
<body>
<h1>The word-break Property</h1>
<h2> break-word</h2>
<p class="break-word">This is IncludeHelp.ThisisIncludeHelp.This is IncludeHelp.This is IncludeHelp.</p>
<h2> break-all</h2>
<p class="break-all">This is IncludeHelp.ThisisIncludeHelp.This is IncludeHelp.This is IncludeHelp.</p>
</body>
</html>

Conclusion:

结论:

Now, as you can see the outputs of these two values you might have gotten the gist about the differences between these two values and their behavior. Both the values appear to be the same but are very different when implemented which could be seen in the outputs above. So go ahead and try it out yourself. And if you face any difficulties, we are always available to help you at https://ask.includehelp.com/.

现在,您可以看到这两个值的输出,您可能已经了解了这两个值之间的差异及其行为。 这两个值看起来是相同的,但在实现时却非常不同,可以在上面的输出中看到。 因此,继续尝试一下。 并且,如果您遇到任何困难,我们随时可以在https://ask.includehelp.com/上为您提供帮助。

翻译自: https://www.includehelp.com/code-snippets/difference-between-values-of-word-break-break-all-versus-break-word-in-css.aspx

css word-wrap

css word-wrap_CSS中分词“ break-all”和“ break-word”的值之间的差异相关推荐

  1. java 操作 word 表格和样式,java读取word表格中的表格 java如何读取word中的excel表格数据...

    Java 利用poi 可以直接读取word中的表格保持样式生1.读取word 2003及word 2007需要的jar包 读取 2003 版本(.doc)的word文件相对来说比较简单,只需要 poi ...

  2. css 第二个孩子选择器,详解CSS3选择器:nth-child和:nth-of-type之间的差异

    先看一个简单的实例,首先是HTML部分: 我是第1个p标签 我是第2个p标签 然后两个选择器相对应的CSS代码如下: p:nth-child(2) { color: red; } p:nth-of-t ...

  3. requests(二): json请求中固定键名顺序消除键和值之间的空格

    继上一篇requests发送json请求的文章后,实际工作中遇到了以下2种情况. 1:服务端要求json字符串,键名的顺序固定  2.服务端对于接收到的json数据中,若key和value之间有空格, ...

  4. matlab 中fzero,matlab – 一个变量的fzero和fsolve之间的差异

    就在这里.我只想提到两者之间最直接的区别: 07000 can be used to solve for the zero of a single variable equation. However ...

  5. word表格转换成html,delphi将word表格转换成html_取得Word 表格中的数据

    delphi将word表格转换成html_取得Word 表格中的数据 1.delphi将word表格转换成html procedure TForm1.Button1Click(Sender: TObj ...

  6. java读取word表格中的数据_JAVA获取word表格中数据的方案

    上一个项目的开发中需要实现从word中读取表格数据的功能,在JAVA社区搜索了很多资料,终于找到了两个相对最佳的方案,因为也得到了不少网友们的帮助,所以不敢独自享用,在此做一个分享. 两个方案分别是: ...

  7. 解决word表格中单元格自动计算的问题

    word表格中单元格自动计算的问题 word中有一个表格,某一列需要累加求和,网上有关于左边所有列求和的方法,和单列求和方法,但是没有左边累加求和的方法 红色标记列是要累加求和,也就是需要计算左边那一 ...

  8. css表格文字位置调整,word表格中的文字距离表格四周太远,怎么才能调的近一些,除了调字大小。...

    word表格中的文字距离表格四周太远,怎么才能调的近一些,除了调字大小.以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! ...

  9. java中用流提取文档中的文字,语言实现从word文档中提取文本

    word中提取中文 打开Word,CTRL+F打开"查找替换"对话框. 点击下方的"查找替换"对话框的"高级"按钮. 点击"特殊字 ...

最新文章

  1. ​​​​​​​跳水板
  2. 轻量级ORM框架Dapper应用三:使用Dapper实现In操作
  3. node js npm 和 cnpm的使用
  4. java servlet例子_Servlet学习教程(三)---- 一个简单的Servlet例子
  5. typeScript模块四
  6. CSharp中的数组和ArrayList及List
  7. 乾坤 微前端_拥抱云时代的前端开发架构——微前端
  8. linux7.0启用图形界面,CentOS 7 设置图形界面启动
  9. 痴情研究java内存中的对象
  10. Adobe Acrobat 如何批量删除PDF文件最后一页或倒数第二页?
  11. 守护线程Deamon
  12. java将Word转换成PDF
  13. Java项目论文+PPT+源码等]S2SH+mysql的报刊订阅系统
  14. 双十一淘宝美妆消费数据分析
  15. 概率论——随机试验、样本空间
  16. java unbox_java base-05-Box UnBox 自动装拆箱
  17. 企业数字化转型思考系列文章(一)何为数字化转型?
  18. 笔记本电脑同时连接内外网亲测有效
  19. 汉寿计算机职业中专,汉寿县职业中等专业学校2021年有哪些专业
  20. PR 2022 最新重大更新 离线语音转文本教程

热门文章

  1. 戴尔电脑好还是华为好_华硕和戴尔笔记本哪种好 华硕和戴尔优缺点分析【详解】...
  2. python手机编译器可以干什么_世界上最好的Python编辑器是什么?
  3. Python二级笔记(2)
  4. MySQL学习(3)单表查询
  5. Ubuntu18使用docker快速安装oracle 11g
  6. 日常问题——flume连接hive时报错Caused by: java.lang.NoSuchMethodError
  7. All men are brothers【并查集+数学】
  8. 【dfs】Election of Evil
  9. AngularJs 冷兵器杂谈
  10. python install zabbix.4.0