Why is my Grid element's height not being calculated correctly?
问题 I'm having trouble with a CSS grid element's height. The code I am using is: .gridContainer { border: thin solid black; background: rgba(255, 0, 0, 0.5); display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr; width: 100px; height: 100px; grid-template-areas: 'windowContentHolder'; } .gridItem { grid-area: windowContentHolder; background: rgba(255, 255, 0, 0.5); width: 200%; height: 200%; } .content { background: rgba(255, 0, 0, 0.5); } <div class="gridContainer"> <div class=