Files
freeCodeCamp/curriculum/challenges/japanese/01-responsive-web-design/css-grid/create-your-first-css-grid.md
2022-01-20 20:30:18 +01:00

1.5 KiB

id, title, challengeType, videoUrl, forumTopicId, dashedName
id title challengeType videoUrl forumTopicId dashedName
5a858944d96184f06fd60d61 最初の CSS グリッドを作成する 0 https://scrimba.com/p/pByETK/cqwREC4 301129 create-your-first-css-grid

--description--

display プロパティを grid に設定することで、任意の HTML 要素をグリッドコンテナに変換します。 これにより、CSS グリッドに関連する他のすべてのプロパティを使用することができます。

注: CSS グリッドでは、親要素を container、子要素を items と呼びます。

--instructions--

container クラスの div の display プロパティを grid に変更してください。

--hints--

container クラスは grid の値を持つ display プロパティを持つ必要があります。

assert(code.match(/.container\s*?{[\s\S]*display\s*?:\s*?grid\s*?;[\s\S]*}/gi));

--seed--

--seed-contents--

<style>
  .d1{background:LightSkyBlue;}
  .d2{background:LightSalmon;}
  .d3{background:PaleTurquoise;}
  .d4{background:LightPink;}
  .d5{background:PaleGreen;}

  .container {
    font-size: 40px;
    width: 100%;
    background: LightGray;
    /* Only change code below this line */


    /* Only change code above this line */
  }
</style>

<div class="container">
  <div class="d1">1</div>
  <div class="d2">2</div>
  <div class="d3">3</div>
  <div class="d4">4</div>
  <div class="d5">5</div>
</div>

--solutions--

<style>.container {display: grid;}</style>