word-wrap语法:

  word-wrap : normal | break-word

    normal : 默认值,单词如果单词超长,会冲出边界(单个单词超长,在当前行显示)

    break-word : 将内容在边界内换行,当单词在当前行放不下时,会自动切换到下一行(单个单词超长,在下一行显示)

word-break语法:

  word-break:normal | break-all | keep-all

    normal:如果设置为默认值时中文则到边界处的汉字换行,如果是英文整个单词换行,如果出现某个单词长度过长,则会撑破容器,如果边框为固定属性,则后面部分将无法显示;(单个单词长度超过容器长度)

    break-all:可以强行截断英文单词,强行换行

    keep-all:不允许字断开。如果是中文将把前后标点符号内的一个汉字短语整个换行,英文单词也整个换行,如果出现某个英文字符长度超过边界,则后面的部分将撑破容器,如果边框为固定属性,则后面部分无法显示

white-space语法:(浏览器处理折行时的空白符)

  white-space:normal | nowrap | pre-wrap | pre-line | inherit

    normal:默认,浏览器忽略空白符

    nowrap:文本不会换行,文本会在在同一行上继续,直到遇到 <br> 标签为止。

    pre-wrap:保留空白符,但是正常地进行换行。

    pre-line:合并空白符,但是保留换行符。

    inherit:继承父元素的设置

最好的处理方式是:(单词折行,超出隐藏)

  word-wrap:break-word;

  overflow:hidden;
 
也可以:
word-wrap:break-word;
word-break:break-all;

word-wrap/word-break/white-space的更多相关文章

  1. word break和word wrap

    默认情况下,如果同一行中某个单词太长了,它就会被默认移动到下一行去: word break(normal | break-all | keep-all):表示断词的方式 word wrap(norma ...

  2. word wrap 解惑

    源起 我们经常需要“修复”一个老生常谈的“bug”,那就是文本的自动换行问题.在专业术语上,这种期望得到的渲染现象被称作“word wrap”,即文本处理器有能力把超出页边的整个词自动传到下一行. 在 ...

  3. reverse the string word by word

    题目:Given an input string, reverse the string word by word. For example,Given s = "the sky is bl ...

  4. LeetCode 5:Given an input string, reverse the string word by word.

    problem: Given an input string, reverse the string word by word. For example: Given s = "the sk ...

  5. Microsoft.Office.Interop.Word 创建word

    Microsoft.Office.Interop.Word 创建word 转载:http://www.cnblogs.com/chenbg2001/archive/2010/03/14/1685746 ...

  6. dom4j解析xml报错:Nested exception: org.xml.sax.SAXParseException: White space is required between the processing instruction target and data.

    采用dom4j方式解析string类型的xml xml:        String string="<?xmlversion=\"1.0\" encoding=\ ...

  7. C#用Microsoft.Office.Interop.Word进行Word转PDF的问题

    之前用Aspose.Word进行Word转PDF发现'\'这个字符会被转换成'¥'这样的错误,没办法只能换个方法了.下面是Microsoft.Office.Interop.Word转PDF的方法: p ...

  8. Sublime Text 2 自动开启换行 Word Wrap

    首先当然要夸一下神器 Sublime Text 2,自从第一次用我就彻底把神马 Notepad++ 和 TextMate 打入冷宫,用来开发 WEB 项目从此 IDE 都不需要了! 下面讲讲如何自动开 ...

  9. 18. Word Ladder && Word Ladder II

    Word Ladder Given two words (start and end), and a dictionary, find the length of shortest transform ...

  10. word to word

    Question: For each word, you can get a list of neighbor words by calling getWords(String), find all ...

随机推荐

  1. Monocular Visual-Inertial Odometry单目视觉惯性里程计

    Monocular Visual-Inertial Odometry:https://www.qualcomm.com/invention/research 单目视觉-惯性里程计 INDOOR POS ...

  2. Hdu1547 Bubble Shooter 2017-01-20 18:38 44人阅读 评论(0) 收藏

    Bubble Shooter Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Tota ...

  3. Codeforces758D Ability To Convert 2017-01-20 10:29 231人阅读 评论(0) 收藏

    D. Ability To Convert time limit per test 1 second memory limit per test 256 megabytes input standar ...

  4. Javascript Object.defineProperty()

    转载声明: 本文标题:Javascript Object.defineProperty() 本文链接:http://www.zuojj.com/archives/994.html,转载请注明转自Ben ...

  5. Sql 四大排名函数(ROW_NUMBER、RANK、DENSE_RANK、NTILE)

    row_number() over()   1.2.3.4.5.6.7 rank() over()  1.2.2.4.5.5.7 dense_rank() over() 1.2.2.3.3.4.5 n ...

  6. 如何创建一个自己的.NET Core Global Tools

    索引 NET Core应用框架之BitAdminCore框架应用篇系列 框架演示:https://www.bitadmincore.com 框架源码:https://github.com/chenyi ...

  7. django 打印sql语句

    LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console': { 'level': 'DE ...

  8. LockBox的安装

    LockBox是一套加密解密库,下载地址:http://sourceforge.net/projects/tplockbox/ 我的安装的操作系统:win7 64位 安装步骤如下: 一,安装: 安装时 ...

  9. Learning Rich Features from RGB-D Images for Object Detection and Segmentation论文笔记

    相关工作: 将R-CNN推广到RGB-D图像,引入一种新的编码方式来捕获图像中像素的地心姿态,并且这种新的编码方式比单纯使用深度通道有了明显的改进. 我们建议在每个像素上用三个通道编码深度图像:水平视 ...

  10. 1416: Kick Ass Biu [几何]

    点击打开链接 1416: Kick Ass Biu [几何] 时间限制: 1 Sec 内存限制: 128 MB 提交: 174 解决: 35 统计 题目描述 在玩Kick Ass的时候,可以发现子弹的 ...