嗨,为了重现这个
:root{
--black: rgb(11, 14, 17);
--green: rgb(112, 228, 80);
--gray: rgb(55, 55, 55);
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
width: 100%;
height: 100%;
background-color: var(--black);
color: #eee;
}
#rect-bar{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 15px;
overflow: hidden;
}
#rect-bar .rect-row{
width: 100%;
height: 150px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
/* border: 1px solid white; */
}
#rect-bar .rect-row .rect-cube{
margin: 5px;
width: 150px;
height: 150px;
border-radius: 15px;
background-color: var(--green);
/* border: 1px solid white; */
}
#rect-bar .rect-row .rect-cube.rcg{
width: 120px;
height: 120px;
background-color: var(--gray);
}
<div id="rect-bar">
<div class="rect-row">
<div class="rect-cube rcg">
</div>
<div class="rect-cube">
</div>
</div>
<div class="rect-row">
<div class="rect-cube">
</div>
<div class="rect-cube rcg">
</div>
</div>
</div>
我一整天都在想这个问题,不知道两个绿色矩形的中间部分是如何相互连接的.
如果你能给我一些好主意,我将非常高兴.