gpt4 book ai didi

html - 防止div溢出

转载 作者:可可西里 更新时间:2023-11-01 13:47:01 25 4
gpt4 key购买 nike

如何防止这两个溢出?我几乎尝试了一切,所以我不知道从这里去哪里。div 用绿色和橙色标记。 enter image description here

enter image description here

#stemplingerclass {
clear: both;
max-width: 100%;

}

#datoid
{

clear: both;
max-width: 100%;
}
<div class="col-sm-10">
<div class="col-md-3 col-sm-3 col-xs-10 text-center" style="background-color: green;" >
<div id="datoid">


</div>
</div>

<div class="col-md-7 col-sm-7 col-xs-10" style="background-color: orange;">
<div id="stemplingerclass">

</div>
</div>
</div>

最佳答案

只需将 display: flex; 添加到这两个 div 的容器中即可。如果您不希望 child 拉伸(stretch),还可以将 align-items: flex-start; 添加到您的容器中。

关于html - 防止div溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40926682/

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