--- id: 5a90373638fddaf9a66b5d39 title: grid-row を使用してスペースを制御する challengeType: 0 videoUrl: 'https://scrimba.com/p/pByETK/c9WBLU4' forumTopicId: 301137 dashedName: use-grid-row-to-control-spacing --- # --description-- もちろん、列と同じように複数の行をアイテムに消費させることもできます。 グリッドアイテムに `grid-row` プロパティを使用して、アイテムを開始・終了させたい水平方向の線を定義します。 # --instructions-- `item5` クラスの要素が最後の 2 行を消費するようにしてください。 # --hints-- `item5` クラスが `grid-row` プロパティを持つようにしてください。 ```js assert( __helpers.removeWhiteSpace($('style').text()).match(/\.item5{.*grid-row:.*}/g) ); ``` `item5` クラスの `grid-row` プロパティは、グリッドの最後の 2 行を消費するように設定される必要があります。 ```js const rowStart = getComputedStyle($('.item5')[0]).gridRowStart; const rowEnd = getComputedStyle($('.item5')[0]).gridRowEnd; const result = rowStart.toString() + rowEnd.toString(); const correctResults = [ '24', '2-1', '2span 2', '2span2', 'span 2-1', '-12', 'span 2span 2', 'span 2auto', 'autospan 2' ]; assert(correctResults.includes(result)); ``` # --seed-- ## --seed-contents-- ```html
1
2
3
4
5
``` # --solutions-- ```html
1
2
3
4
5
```