文本超出父级div

问题描述 投票:0回答:1

我从数据库中得到一段文本并加载到 div 中,但文本一直从 div 中出来。有什么解决方案吗?

.teksten {
	width:500px;
	word-wrap:break-word;
}
.text {
	width:500px;
}
<div class="teksten">
  <p class="text">
    <?php
        echo $klant[0]["taak1Info"];
    ?>
  </p>
</div>

html css text
1个回答
1
投票

这确实有效:

white-space: normal;

谢谢!

© www.soinside.com 2019 - 2024. All rights reserved.