-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[html] 第372天 实现九宫格布局 #2270
Comments
<style>
.container::after{
content: "";
display: block;
clear: both;
}
.box{
float: left;
width: 32%;
padding-bottom: 32%;
background-color: red;
margin-bottom: 1%;
}
.box:not(:nth-child(3n)){
margin-right: 1%;
}
</style>
<div class="container">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div> |
1 similar comment
<style>
.container::after{
content: "";
display: block;
clear: both;
}
.box{
float: left;
width: 32%;
padding-bottom: 32%;
background-color: red;
margin-bottom: 1%;
}
.box:not(:nth-child(3n)){
margin-right: 1%;
}
</style>
<div class="container">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div> |
grid 网格布局 .layout {
display: grid;
grid-template-columns: 100px 100px 100px;
grid-template-rows: 100px 100px 100px;
} <div class="layout"></div> |
flex布局 |
第372天 实现九宫格布局
我也要出题
The text was updated successfully, but these errors were encountered: