css - 内容不留在 div 内

标签 css html

我有一个 div,其中 div 的内容“转义”了 div。

例如,如果我输入类似 ssssssssssssssssssssss 的内容(等等 :P),它只会越过 div 边缘,而不是中断并继续下一行。

CSS:

#content {
 position:absolute;
 width: 855px;
 padding: 195px;
 padding-top: 0px;

最佳答案

将以下内容添加到 CSS:

word-wrap: break-word;

另见 https://developer.mozilla.org/en/CSS/word-wrap

关于css - 内容不留在 div 内,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2781773/

相关文章:

css - 如何在 Bootstrap 下拉菜单上给用户更多时间?

html - 第 nth-child () 只有一个属性在工作 - 为什么?

javascript - 在特定选择上显示单选按钮

html - 将父 div 与子 div 一起移动?

html - 使用 Bootstrap 填充移动版本

javascript - 如何在按钮单击时显示在 html 中实际未设置为 none 的 div?

javascript - Highcharts 仪表 : Adding Icons

javascript - 以完全只读方式转换 HTML 文本框

html - 在不移动其他文本的情况下增加字体大小

html - CSS 为什么 div 重叠?