字母汉字可以换行 标点符号不能换行 求助

只有我能叫神仙鱼 2016-01-09 10:22:26

如图

部分代码如下:

<div class="chatBox">
<div class="chatPicLeft">
<img src="../static/app/images/alice.png" style="height:100%;width:100%"/>
</div>
<div class="chatContentLeft">
<div class="chatBoxLeft">
<span class="textClass">hello.你好呀!标点不会自动换行标点不会自动换行标点不会自动换行。。。。。。。。。。。。。。。。。。。。。。。。</span>
</div>
</div>
</div>

<div class="chatBox">
<div class="chatPicRight">
<img src="../static/app/images/alice.png" style="height:100%;width:100%"/>
</div>
<div class="chatContentRight">
<div class="chatBoxRight">
<span class="textClass">hello</span>
</div>
</div>
</div>

<div class="chatBox">
<div class="chatTime"><span>12:30</span></div>
</div>

<div class="chatBox">
<div class="chatPicLeft">
<img src="../static/app/images/alice.png" style="height:100%;width:100%"/>
</div>
<div class="chatContentLeft">
<div class="chatBoxLeft">
<span class="textClass">标点不会自动换行标点不会自动换行标点不会自动换行标点不会自动换行标点不会自动换行标点不会自动换行hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello</span>
</div>
</div>
</div>

</div>



.chatBox{
padding:1rem 1rem 0rem 1rem;
position:relative;
}

.chatPicLeft{
height:2.5rem;
width:2.5rem;
float:left;
position:absolute;
}

.chatContentLeft{
margin-left:3.5rem;
margin-right:4.5rem;
}

.chatPicRight{
height:2.5rem;
width:2.5rem;
right:1rem;
float:right;
}

.chatContentRight{
text-align:right;
margin-left:4.5rem;
margin-right:3.5rem;
}

.chatTime{
text-align:center;
}

.input{
position:fixed;
bottom:0;
z-index:9999;
height:3rem;
width:100%;
background-color:gray;
}

.textClass{
word-break:break-all;
}

.chatBoxLeft{
display:inline-block;
padding:0.5rem;
background-color:#ffffff;
-webkit-border-radius:0.3rem;
-moz-border-radius:0.3rem;
-o-border-radius:0.3rem;
border-radius:0.3rem;
}

.chatBoxRight{
display:inline-block;
padding:0.5rem;
background-color:#ffffff;
-webkit-border-radius:0.3rem;
-moz-border-radius:0.3rem;
-o-border-radius:0.3rem;
border-radius:0.3rem;
}
...全文
292 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
天际的海浪 2016-01-09
  • 打赏
  • 举报
回复

.textClass{
	word-break: break-all;
	word-wrap: break-word;
}
  • 打赏
  • 举报
回复
自顶。。。。。。。。。。。。。。。。。。。
  • 打赏
  • 举报
回复
顶一下。。。。。。。。

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧