sagaX
by sabbin
HTML
<div class="Comment">
<div style="height:30px; background-color:aquamarine">this is the top</div>
<div class="CommentBodySurround">
<div class="CommentBody">
<div class="box">
1
</div>
<div class="box">
2
</div>
<div class="box">
3
</div>
<div class="box">
4
</div>
<div class="box">
5
</div>
<div class="box">
6
</div>
<div class="box">
7
</div>
<div class="box">
8
</div>
<div class="box">
9
</div>
<div class="box">
10
</div>
</div>
</div>
</div>
CSS
.Comment {
width: 320px;
height: calc(100vh - 40px);
background-color: burlywood;
}
.CommentBodySurround {
height: calc(100% - 40px);
overflow: auto;
}
.CommentBody {
flex-direction: column;
}
@media screen and (min-width:700px) {
.Comment {
width: 650px;
}
.CommentBodySurround {
height: calc(100% - 40px);
}
.CommentBody {
column-count: 2;
width: 630px;
}
}
@media screen and (min-width:1020px) {
.Comment {
width: 960px;
}
.CommentBodySurround {
height: calc(100% - 40px);
}
.CommentBody {
column-count: 3;
width: 940px;
}
}
.box {
width: 290px;
margin: 3px;
border: 3px solid #345787;
border-radius: 12px;
display: inline-flex;
background-color: #F1F1F2;
height: 100px;
justify-content: space-evenly;
}