英文的wordwrap
来源:互联网 发布:linux协议栈实现分析 编辑:程序博客网 时间:2024/06/10 00:17
CSS文本:word-wrap .28
语法:
word-wrap : normal | break-word
取值:
normal : 默认值。允许内容顶开指定的容器边界
break-word : 内容将在边界内换行。如果需要,词内换行( word-break )也将发生
说明:
设置或检索当当前行超过指定容器的边界时是否断开转行。
此属性仅作用于有布局的对象,如块对象。内联要素要使用该属性,必须先设定对象的 height 或 width 属性,或者设定 position 属性为 absolute ,或者设定 display 属性为 block 。
此属性对于 currentStyle 对象而言是只读的。对于其他对象而言是可读写的。
对应的脚本特性为 wordWrap 。
示例:
div { word-wrap: break-word; word-break: break-all; }
wordwrap
(PHP 4 >= 4.0.2)
wordwrap -- Wraps a string to a given number of characters using a string break character.Description
string wordwrap ( string str [, int width [, string break [, boolean cut]]])Returns a string with str wrapped at the column number specified by the optional width parameter. The line is broken using the (optional) break parameter.
wordwrap() will automatically wrap at column 75 and break using '/n' (newline) if width or break are not given.
If the cut is set to 1, the string is always wrapped at the specified width. So if you have a word that is larger than the given width, it is broken apart. (See second example).
注: The optional cut parameter was added in PHP 4.0.3
例子 1. wordwrap() example
<?php
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap($text, 20, "<br />");
echo "$newtext/n";
?>
This example would display:
The quick brown foxjumped over the lazy dog.
例子 2. wordwrap() example
<?php
$text = "A very long woooooooooooord.";
$newtext = wordwrap($text, 8, "/n", 1);
echo "$newtext/n";
?>
This example would display:
A verylongwoooooooooooord.
- 英文的wordwrap
- wordwrap
- 新浪旧事-myeclipse的虚拟换行wordwrap
- textField: wordWrap与autoSize的关系
- 解决eclipse的自动换行问题 【安装wordWrap插件】
- Flex中如何通过variableRowHeight和wordWrap属性,创建行高度可变的Tree
- wordwrap导致邮件乱码
- eclipse插件wordwrap
- eclipse 自动换行wordwrap 插件
- Eclipse自动换行插件wordwrap
- flex中文本自动换行功能。WordWrap
- Eclipse安装wordwrap设置自动换行
- 英文地址的翻译
- 英文地址的翻译
- 英文地址的翻译
- 有趣的英文
- 有用的英文谚语
- 收集的英文谚语
- 三种地理信息辅助路由协议分析
- Linux编程学习三
- 怎么每天都有人去自杀
- OpenGL开发工具
- 黄页是什么意思
- 英文的wordwrap
- CSS文本 -zt
- 如何杀掉本地和远程NT系统进程
- freebsd history
- 吃龙虾记
- RFC文档目录 地址1
- 通杀Windows用户态进程的命令
- 关于 Service 设计初步(MSDN节选翻译)
- 控制台下修改系统驱动状态的代码