文本流出div [英] text flowing out of div

查看:86
本文介绍了文本流出div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当文字无空格大于div大小200像素时,它会流出
宽度定义为200px
我已放置我的代码在这里。


When the text is without spaces and more than the div size 200px it's flowing out The width is defined as 200px I have put my code here http://jsfiddle.net/madhu131313/UJ6zG/ You can see the below pictures edited: I want the the text to go to the next line

解决方案

It's due to the fact that you have one long word without spaces. You can use the word wrap property to cause the text to break:

#w74 { word-wrap: break-word; }

It has fairly good browser support, too. See documentation about it here.

这篇关于文本流出div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆