gpt4 book ai didi

javascript - 达到最大高度并且 div 像响应式 overflow-x 一样继续向右移动

转载 作者:行者123 更新时间:2023-11-28 16:18:17 26 4
gpt4 key购买 nike

是否可以实现这种布局,可以告诉我怎么做吗?

enter image description here

CSS

.broad-structure{
display: inline-block;
width: 450px;
border-left: 1px solid #eee;
white-space: normal;
}

.broad-content{
padding: 30px;
}

.structure .veno{
float: left;
margin-right:20px;
width: 80px;
height: 80px;
border-radius: 50%;
}

.desc-pro{
padding: 15px 0;
}

.story{
white-space: normal;
text-align: justify;
}

.nodes{
background-color: rgba(221, 213, 213, 0.11);
height: 100%;
}

.grayz{
background-color: rgba(221, 213, 213, 0.11);
}

.fishy{
background-color: rgba(221, 213, 213, 0.11);
height: 100%;
}

.chandelier{
padding: 30px;
}

.tagline img{
width: 100%;
height: 350px;
}

.cont-struct{
height: 850px;
overflow: hidden;
}

.viso{
display: inline-block;
width: 420px;
border-left: 1px solid #eee;
white-space: normal;
border: 1px solid #eee;
}

.construct{
padding: 30px;
}

.construct h3{
color: rgba(104, 109, 132, 0.58);
font-weight: 700;
margin-top: 20px;
}

.btn-nero {
width: 88%;
}

.setia{
width: 100%;
height: 200px;
cursor: pointer;
}

这是 DEMO

最佳答案

可以实现这种布局..

将这些样式添加到您的包装器元素 display: flex ; flex 方向:列; flex 包装:包装;并为其赋予包装器所需的高度和宽度。

然后在 child 中放置 height:200px(或其他),然后当包装器无法容纳更多元素时,它将把它们推到下一列..

<style>

.broad-structure {
display: flex;
flex-direction: column;
flex-wrap: wrap;
height: 600px;
border: 1px solid red;
}
.broad-content{
height: 150px;
}

</style>

关于javascript - 达到最大高度并且 div 像响应式 overflow-x 一样继续向右移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37314188/

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