gpt4 book ai didi

html - 即使在放大后如何将子内容放入父 div

转载 作者:行者123 更新时间:2023-11-28 01:42:35 25 4
gpt4 key购买 nike

如何将子 div 内容放入父 div。这样即使我放大屏幕,子div也不会从父div中出来。

<div>
<div title="childDiv" style="width:auto;">
<h3 class="headerwidth" style="margin-top:1px; margin-bottom:0px"> &nbsp;Test:</h3>
Welcome to the this new page test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test
</div>

我试过溢出:隐藏但不起作用

最佳答案

<style>
p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
<div>
<div title="childDiv">
<h3 class="headerwidth"> &nbsp;Test:</h3>
<p>Welcome to the this new page test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test
</p>
</div>
</div>

希望我明白你的问题。

https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow

关于html - 即使在放大后如何将子内容放入父 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50358484/

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