* {margin: 0; padding: 0 ; box-sizing: border-box ; } reset style
In the HTML to
<div class="container"></ div>
<div class="a"></ div>
<div class="b"></ div>
<div class="c"></ div>
<div class="d"></ div>
<div class="e"></ div>
</ div>
Copy the code
Add styles to CSS
.container{ display: grid; grid-template-columns: 40px 50px auto 50px 40px; /* Split into 5 rows */ grid-template-rows: 100px 300px 100px; /* Split into 3 lines */ border: 1px solid green; } .a { border: 1px solid black; } .a { grid-row-start: 1; */ grid-row-end: 3; /* grid-row-end: 3; /* grid-row-end: 3; / / grid-column-start: 1; / / grid-column-start: 1; / / grid-column-end: 3; / / grid-column-end: 3; / / grid-column-end: 3; /* as above */}Copy the code