解决文字溢出,换行等问题
2011-11-24 21:24
225 查看
完美强制换行,必须之前设定高度
http://blog.csdn.net/guo_rui22/article/details/2301426 这里的答案 ff不支持
这里面有 强制不换行:white-space:nowrap; (所有的都支持).强制换行:word-break:break-all;(不支持ff)
http://www.cnblogs.com/analyzer/articles/1285732.html 这里 ie chrome ff 都支持
里边关于老外的资料:http://ecmascript.stchur.com/2007/02/22/emulating-css-word-wrap-for-mozillafirefox/
上代码
word-wrap:break-word; word-break:break-all; -moz-binding: url('./wordwrap.xml#wordwrap'); overflow: hidden;
http://blog.csdn.net/guo_rui22/article/details/2301426 这里的答案 ff不支持
这里面有 强制不换行:white-space:nowrap; (所有的都支持).强制换行:word-break:break-all;(不支持ff)
http://www.cnblogs.com/analyzer/articles/1285732.html 这里 ie chrome ff 都支持
里边关于老外的资料:http://ecmascript.stchur.com/2007/02/22/emulating-css-word-wrap-for-mozillafirefox/
上代码
<html> <body> <div style="width:50px;height:200px;"> <span style="color:Red">自动换行的</span>你没你妹妹你没你妹妹你没你妹妹你没你妹 </div> <div style="width:50px;height:50px;white-space:nowrap"> <span style="color:Red">强制换行</span>你没你妹妹你没你妹妹你没你妹妹你没你妹妹你没你妹妹 </div> <div style="width:50px;height:250px;word-break:break-all"> <span style="color:Red">ff不支持</span>ssssssssssssssssssssssssssssssssssssssssssssssssss </div> <div style="width:50px;height:200px; word-wrap:break-word;word-break:break-all; -moz-binding: url('./wordwrap.xml#wordwrap');overflow: hidden;"> <span style="color:Red">所有都支持</span>ssssssssssssssssssssssssssssssssssssssssssssssss </div> <!--因为下面图片不是真正的图片 而有边框所以width>两个img之和 如有同学可以修改div的width为100,并且让它两个一组 那请联系我 --> <div style="width:110px;height:50px;"> <img src="#" width="50" height="50" style="border:none"> <img src="#" width="50" height="50" style="border:none"> <img src="#" width="50" height="50" style="border:none"> <img src="#" width="50" height="50" style="border:none"> </div> </body> </html>
相关文章推荐
- [Visio 2007]解决 “类图”调整宽度后,换行的文字溢出的问题(如何调整“类图”的高度?)
- android中画文字的换行 办法(对于遇到canvas.drawText(String s )无法实现换行问题的解决)
- 自定义View控件解决android文字排版和换行的问题
- android自定义View画文字的换行问题的解决
- 自定义View控件解决android文字排版和换行的问题
- kindeditor从word粘贴表格不显示边框,kingeditor文字图片混排溢出——问题已解决
- 纯CSS的方法解决文字溢出与截断的问题
- Objective-C文字换行方式(解决英文在行末时的换行问题)
- android中画文字的换行 办法(对于遇到canvas.drawText(String s )无法实现换行问题的解决
- 解决在IE6下文字溢出(多出一行字)的问题方案
- 解决ie6下li左浮动文字换行的问题
- android中画文字的换行 办法(对于遇到canvas.drawText(String s )无法实现换行问题的解决)
- firefox样式表cursor和兼容Ie firefox,解决文字溢出的问题(word-wrap:break-word;word-break:break-all)
- [转]兼容IE firefox(FF下不认word-break及word-wrap),解决文字溢出的问题
- 解决容器内文字不自动换行的问题
- 当对象内文本溢出时显示省略标记 使文字换了行,解决了把div表格撑的很大的问题
- 通过自定义TextView,拉伸每行解决自动换行文字排版参差不齐问题
- android中画文字的换行 办法(对于遇到canvas.drawText(String s )无法实现换行问题的解决)
- 自定义TextView,解决文字换行,\n换行符换行,导致高度计算不对问题(计算ListView高度)
- android中画文字的换行 办法(对于遇到canvas.drawText(String s )无法实现换行问题的解决)