css3整理--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;
overflow:hidden;
css3整理--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 ...
随机推荐
- 转:关于VS2012连接MySql数据库时无法选择数据源
原文来自 http://www.cnblogs.com/sanduo8899/p/3698617.html 您的C#开发工具是用VS2012吗? No! return; 您的数据库用的 ...
- node,npm的安装
1. 在node的官网下载 2.安装node 3. 4.进入项目根目录,安装依赖:```npm install 如:npm install -g cnpm --registry=https://reg ...
- sublime text3支持Vue语法高亮显示
1.下载文件链接: 或https://github.com/vuejs/vue-syntax-highlight 解开压缩包vue-syntax-highlight-master,其内所有文件备用. ...
- Mac terminal Javac
Mac terminal Javac Open the Terminal's vim , then write them: public class test{ public static void ...
- Material Design Support 8大控件介绍
TextInputLayout 显示提示信息 能够通过调用setError()在EditText以下显示一条错误信息 FloatingActionButton 悬浮操作按钮 Snackbar 相当于底 ...
- [Learn AF3]第七章 App framework组件之Popup
AF3的弹出对话框Popup 组件名称:Popup 是否js控件:是,$.afui.popup 说明:af3中的popup和af2中相比变化不大,依然是通过插件popup来实现的 方法 ...
- 【Ubuntu】/etc/profile
export JAVA_HOME=/home/hp/programmefiles/jdk1.8.0_73/export PATH=$JAVA_HOME/bin:$PATHexport SCALA_HO ...
- 为Hadoop集群选择合适的硬件配置
随着Apache Hadoop的起步,云客户的增多面临的首要问题就是如何为他们新的的Hadoop集群选择合适的硬件. 尽管Hadoop被设计为运行在行业标准的硬件上,提出一个理想的集群配置不想提供硬件 ...
- php5.4安装fileinfo扩展
Fileinfo 扩展是libmagic库的一个封装,可以用来获得文件的一些信息,如MIME类型 安装php_fileinfo扩展 1.windows 用phpinfo()查看php版本 下载 选择合 ...
- 如何使用Maven scope
maven 有6个scope类型,下面简单总结备忘下 <dependency> <groupId>javax.servlet</groupId> <artif ...