Home > Web Front-end > HTML Tutorial > 字母汉字可以换行 标点符号不能换行_html/css_WEB-ITnose

字母汉字可以换行 标点符号不能换行_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:00:25
Original
3296 people have browsed it


如图

部分代码如下:

<div class="chatBox">				<div class="chatPicLeft">					<img  src="../static/app/images/alice.png"   style="max-width:90%"/ alt="字母汉字可以换行 标点符号不能换行_html/css_WEB-ITnose" >				</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="max-width:90%"/ alt="字母汉字可以换行 标点符号不能换行_html/css_WEB-ITnose" >				</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="max-width:90%"/ alt="字母汉字可以换行 标点符号不能换行_html/css_WEB-ITnose" >				</div>				<div class="chatContentLeft">					<div class="chatBoxLeft">						<span class="textClass">标点不会自动换行标点不会自动换行标点不会自动换行标点不会自动换行标点不会自动换行标点不会自动换行hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello</span>					</div>				</div>			</div>		</div>
Copy after login


.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;}
Copy after login


回复讨论(解决方案)

.textClass{	word-break: break-all;	word-wrap: break-word;}
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template