在div中包含非常长的文本 [英] Containing very long text inside div

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

问题描述

好的,所以我有问题包含div内的文字。当它用空格分解时,它将移动到下一行,但如果有一行非常长的文本,它将不会移动到下一行。有人可以帮我用css吗?

解决方案

您可以试试这个CSS:

  word-wrap:break-word; 

或者包含此元素:

  overflow:hidden; 

  overflow:auto; 


Okay so I have problem containing text inside div. When it's broken down with spaces, it will move to the next line but if there is 1 very long line of text, it won't move to the next line. Can someone help me with the css for this?

解决方案

You might try this CSS:

word-wrap: break-word;

or this on the containing element:

overflow: hidden;

or

overflow: auto;

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

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