html:
复制代码代码如下:
<div class="messagebox">
<span class="message">aaaaa<img src="/UploadFiles/2021-03-30/e1.png"></div>
css:
复制代码代码如下:
.messagebox
{
width: 300px;
height: auto;
word-wrap: break-word;
word-break:break-all;
white-space: pre-wrap;
background-color: #333;
padding: 0px;
margin:0px;
}
.message
{
font-size: 30px;
width: 300px;
height: auto;
}
img
{
width: 60px;
height: 50px;
}
效果图: