word-wrap/word-break/white-space
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;
word-wrap/word-break/white-space的更多相关文章
- word break和word wrap
默认情况下,如果同一行中某个单词太长了,它就会被默认移动到下一行去: word break(normal | break-all | keep-all):表示断词的方式 word wrap(norma ...
- word wrap 解惑
源起 我们经常需要“修复”一个老生常谈的“bug”,那就是文本的自动换行问题.在专业术语上,这种期望得到的渲染现象被称作“word wrap”,即文本处理器有能力把超出页边的整个词自动传到下一行. 在 ...
- reverse the string word by word
题目:Given an input string, reverse the string word by word. For example,Given s = "the sky is bl ...
- 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 ...
- Microsoft.Office.Interop.Word 创建word
Microsoft.Office.Interop.Word 创建word 转载:http://www.cnblogs.com/chenbg2001/archive/2010/03/14/1685746 ...
- 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=\ ...
- C#用Microsoft.Office.Interop.Word进行Word转PDF的问题
之前用Aspose.Word进行Word转PDF发现'\'这个字符会被转换成'¥'这样的错误,没办法只能换个方法了.下面是Microsoft.Office.Interop.Word转PDF的方法: p ...
- Sublime Text 2 自动开启换行 Word Wrap
首先当然要夸一下神器 Sublime Text 2,自从第一次用我就彻底把神马 Notepad++ 和 TextMate 打入冷宫,用来开发 WEB 项目从此 IDE 都不需要了! 下面讲讲如何自动开 ...
- 18. Word Ladder && Word Ladder II
Word Ladder Given two words (start and end), and a dictionary, find the length of shortest transform ...
- word to word
Question: For each word, you can get a list of neighbor words by calling getWords(String), find all ...
随机推荐
- swift - 动态计算文本高度
func heightOfCell(text : String) -> CGFloat { let attributes = [NSFontAttributeName:UI ...
- fedora 系统安装后常用设置
#表示root命令 $表示普通用户命令 给普通用户添加sudo权限 #visudo (编辑/etc/sudoers文件的命令) root all = (all) all username al ...
- 开通博客暨注册github事件
(1) 姓 名:丁新宇 学 号:1413042054 班 级:网工142 兴趣爱好:听歌.看书.编代码. (2) GitHub注册流程: 1,百度搜索GitHub,进入官 ...
- nancyfx 自定义路由module
在源码的Nancy.Demo.CustomModule项目示例中 查看UglifiedNancyModule.cs文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 ...
- Centos 安装 erlang 环境
系统 Centos 6.5 64位 Erlang 18.3.4 安装依赖组件 yum install -y gcc gcc-g++ unixODBC unixODBC-devel wxBase wxG ...
- Ocelot 新手上路
新手上路,老司机请多多包含!Ocelot 在博园里文章特别多,但是按照其中一篇文章教程,如果经验很少或者小白,是没法将程序跑向博主的结果. 因此总结下 参考多篇文章,终于达到预期效果. Oce ...
- kolla-ansible 重新部署 ceph 遇到的问题
问题 TASK [ceph : Fetching Ceph keyrings] ******************************************* fatal: [controll ...
- Android Studio设置字体
一,点"Settings"按钮,调出配置界面: 然后如图找到 Editor-colors&font-font ,默认的不让修改 所以先点击save as 随便起个名字 , ...
- PHP设计超级好用的文件上传处理类一 (37)
<?php class FileUpload { private $filepath; //指定上传文件保存的路径 private $allowtype=array('gif', 'jpg', ...
- java学习笔记—EL表达式(38)
EL表达式 EL即Expression Language,主要的任务是帮助开发者简化获取域属性. 但是一般情况下需要使用EL和JSTL结合使用. 语法: ${ // 隐含对象|直接写域中的属性 } ...