gpt4 book ai didi

html - 如何让文本在
内环绕?

转载 作者:行者123 更新时间:2023-11-28 15:16:50 25 4
gpt4 key购买 nike

我有这个 HTML:

<div style="word-wrap: normal; width: 20rem; max-width: 30rem; border: 1px solid red;">
already, always, very - a word or phrase that modifies or qualifies an adjective, verb, or other adverb or a word group, expressing a relation of place, time, circumstance, manner, cause, degree, etc. (e.g., gently, quite, then, there ).
</div>

如果<div>,我想要的是让文本在内部环绕自己.但是它溢出并且根本不做任何环绕。

有没有办法让它环绕而不是从 <div> 的右侧流出? ?

最佳答案

文字没有溢出,有背景就可以看。您可以通过添加使其更规则

text-align: justify; text-align-last: left

<div style="word-wrap: normal; width: 20rem; max-width: 30rem; background: #cacaca">
already, always, very - a word or phrase that modifies or qualifies an adjective, verb, or other adverb or a word group, expressing a relation of place, time, circumstance, manner, cause, degree, etc. (e.g., gently, quite, then, there ).
</div>


<div style="word-wrap: normal; width: 20rem; max-width: 30rem; text-align: justify; text-align-last: left">
already, always, very - a word or phrase that modifies or qualifies an adjective, verb, or other adverb or a word group, expressing a relation of place, time, circumstance, manner, cause, degree, etc. (e.g., gently, quite, then, there ).
</div>

关于html - 如何让文本在 <div> 内环绕?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42251880/

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