TAG
CSS
Result
Run
License
<div class="wrapper"> <div>A</div> <div>B</div> <div>C</div> <div>D</div> </div>
body { width: 600px; } .wrapper { width: 100px; height: 150px; display: grid; grid: auto / auto auto auto; border: 1px solid #FF0000; align-items: self-start; } .wrapper > div { background-color: #80e1f2; flex-grow: 1; } .wrapper > div:nth-child(2n) { background-color: #f9ee9a; }
Console
expand_less
License
License
by DevDic
Close