gpt4 book ai didi

html - 如何处理 CSS 中的文本换行?

转载 作者:行者123 更新时间:2023-11-28 02:12:16 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Auto-size dynamic text to fill fixed size container

请看这个:

enter image description here

文本“parenthood”是一个词,但它分两行,因为没有足够的空间容纳在包含的 div 中。在将此属性添加到 div 之前:

word-wrap: break-word;

为人 parent 这个词直接从屏幕上消失了,这不是什么好事,因为我希望用户能够阅读标题。但如果它落在 2 行上,它看起来也不会好多少。减小文本大小的明显解决方案不起作用的原因是因为这些框是由后端动态生成的。所以有时标题可能很小有时巨大。

有没有办法让文本每次都调整大小以完全适合?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com