如何在div中创建文本自动段落?

问题描述

如何在最大宽度为200px等的div中创建新段落。 当我的文字长度超过200像素时,我希望在div中创建一个新段落。

有可能吗?

body {
    background-color: #6B6B6B;
    margin: 50px;   
    font-family: Arial;
    color: grey;
    font-size: 12px;
    font-weight: 100;
    line-height: 1;
    letter-spacing: .5px;
}
    .bubble {
    position: absolute;
    height: 40px;
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0px 30px 30px 30px;
    background-color:rgba(0,.3);
}
<p style="color:white;">i.e. when max div width (200px) is reached new paragraph is made:</p>

<p class="bubble">Hi Yummi</p>

<p>&nbsp;</p>
<p>&nbsp;</p>

<p class="bubble">Hi Yummi,how are you <br>do you find your cat?</p>

解决方法

获得解决方案:

max-width:200px;
padding: 15px;

PS不使用高度:

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...